Printable Version of Topic

Click here to view this topic in its original format

Armed Assault Info Forums _ Mission Editing & Scripting _ Empty Vehicle with Lights ON

Posted by: Sniper_Ghost Apr 25 2009, 12:38

I'm currently doing a zombie mission and i want several cars to be around the city with there lights still on and the 'crew' dead inside or missing. How can I do this. I've browsed the forums and havent found anything. Also looking through wikipedia and OFPEC has just left me with a headache. wacko.gif

Is there anyway to do this without doing a script?

Posted by: Rellikki Apr 25 2009, 15:13

Try this:

CODE
car_name action ["lightOn", car_name]

Posted by: Linker Split Apr 25 2009, 18:55

there's no way, cause it must be engine on...

Posted by: Electroself Apr 26 2009, 05:57

I haven't tried it now to make sure, but if you enter a vehicle, the lights do come on with 'engine on', as I left the vehicle, the lights remained on....I'm sure they did.....I think...maybe....

So could you not add a vehicle with AI inside, then run a command to move the AI soldier from the car to another part of the map to hide him? Would that not work guys?


Posted by: Sniper_Ghost Apr 26 2009, 08:10

QUOTE
I haven't tried it now to make sure, but if you enter a vehicle, the lights do come on with 'engine on', as I left the vehicle, the lights remained on....I'm sure they did.....I think...maybe....

So could you not add a vehicle with AI inside, then run a command to move the AI soldier from the car to another part of the map to hide him? Would that not work guys?


Afraid not. If you move the soldier out of the car the engine turns of along with the lights.

EDIT: I've found a solution kind of biggrin.gif :

1) I made an empty vehicle
2) Made a soldier 'Get In' the vehicle and called the soldier 'S1' (set to 'careless')
3) Then I made a 2nd 'Move' waypoint and in the activation bar I put the following script "S1 SetDamage 1"

This means that when the vehicle reaches the move waypoint, unit 'S1' dies inside leaving the engine/lights ON.

This can be repeated for however many crew are inside the vehicle i.e S1 SetDamage 1; S2 SetDamage 1; S3 SetDamage 1 etc...

Though it does seem you CAN'T have a vehicle simply abandoned mellow.gif

Posted by: Rellikki Apr 26 2009, 10:47

But of course you can. This is done by ejecting the vehicle. As Electroself told above, ejecting vehicle keeps its engine and lights on. Try this:

CODE
unit_name action ["eject", vehicle_name]


After this you could setPos or deleteVehicle him away so he won't be wandering around the abandoned vehicle anymore.

Posted by: Tyger Apr 26 2009, 18:12

Create a game logic, and use moveInDriver on the game logic to put him inside the car you wish the lights to be on in. That should do the trick for you.

Posted by: Rellikki Apr 26 2009, 18:14

Tyger, is that even possible? blink.gif Does this mean you can put "invisible" drivers in vehicles too driving around?

EDIT: Well, I just had a try on it myself and it sure works. I didn't get them to drive around though... tongue.gif Silly guess.

Posted by: D@V£ Apr 26 2009, 18:26

This is actually way simplier than everyone is making out.

Rellikki's approach is pretty much it, but it won't work because he's trying to have a vehicle call the action event, only soldiers can. Also, as Linker correctly pointed out the engine needs to be on.

So, yeah, just use the EngineOn command.

In the vehicle init:

CODE
This engineOn true

Then a trigger with a timeout of about 2 seconds or so (don't forget to set condition to "true")
CODE
Player action ["lightOn", Car]


It's pretty simple really... tiredsmiley.gif

Posted by: Fatality Oct 26 2009, 05:47

how do you get a tank with the crew to keep its lights on?

Posted by: Legislator Oct 26 2009, 07:19

Use the scripting command setBehaviour and its parameter "careless" or "safe": tank1 setBehaviour "careless";

Posted by: Stawebopl Oct 15 2014, 10:57

Thank you for good communication.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)