Jump to content
Sign in to follow this  
Rejn

Truckhorn

Recommended Posts

Searched under horn, carhorn and truck horn but nothing comes up..

I did see this question being asked but it was a subquestion unrelated to the topic... People please label topics correctly.

I tried unit fire "truckhorn" for a ural... doesnt seem to work.. is there another way of doing this?

Share this post


Link to post
Share on other sites

the horns work as a weapon with no magazine. the horn sound is actually the "click" or pulling the trigger with no ammo. The AI won't pull the trigger with an empty mag using the "fire" command.

However, I can get the AI to pull the trigger using the "USEWEAPON" action. It should be able to work for a vehicle although i haven't got it to work yet.

Eg:

player action ["useWeapon",bob,bob,0]

player does the "action action" (bends down as if to pick something up), bob fires his 0 index weapon (without any aiming or ammo check). You can use any unit to initiate the action, even a game logic.

edit - man action ["useWeapon",truck,driver truck,0]

FTW smile_o.gif

Share this post


Link to post
Share on other sites

The last command line I posted does work. Toot,toot! Actions are very poorly documented and I've been trying to figure them out over the past week or so.

Share this post


Link to post
Share on other sites

This is a very nice find ! smile_o.gif

I´ve been looking for a way to make them honk for ages.

Maybe you could make a small entry in the editor database about it.

Thank you !

Edit:

Just ran for a quick test.

Placed driver named driver1

Placed truck, named truck1

Moved in driver per init line

and used the code:

driver1 action ["useWeapon",truck,driver truck1,0]

Doesn´t work for me.

Share this post


Link to post
Share on other sites

I havn't checked this out yet. Will try it soon as I fix my unit spawn script D: without it I wont be needing the truck horn *cries* banghead.gifgoodnight.gifhelp.gif

Share this post


Link to post
Share on other sites

driver1 can't perform the action while he is in the truck, only man units (or game logics!) that are not in a vehicle can perform actions. You need to use a different unit to perform the action upon the truck driver. It sounds very illogical but thats the way it works. You've also use truck and truck1. It should be the same vehicle.

edit: fuck i hate smilies!!

Share this post


Link to post
Share on other sites

This is really weird biggrin_o.gif

It works though.

For all who had problems (and CTD´s) aswell:

- Place a truck on the map, name it truck1

- either have a man in it from the beginning or moveindriver a guy

- now either create a GameLogic named honker or use a live unit named honker for the job

Setup a trigger and have it activated by whatever you like. In OnActivation type:

honker action ["useWeapon",truck1,driver truck1,0]

As Gamelogics don´t have to go through the animation as live units have to, it´s probably the best choice if you want to have honks in short intervals e.g. in a script.

Thx again fasad !

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×