Jump to content
Sign in to follow this  
failtolawl

Spawn an empty vehicle with engine on.

Recommended Posts

I want to spawn an already empty vehicle with the engine running so it is targetable with a javilin or Air to Ground, what do I need to put in the init for this to happen? thanks in advanced!

Edited by failtolawl

Share this post


Link to post
Share on other sites
engineOn will turn on the engine, but I am not sure if this works if it is empty. Worth a try though.

Share this post


Link to post
Share on other sites
target = "MTVR" createVehicle getMarkerPos "targetSpawn";
player action["EngineOn", target];

Share this post


Link to post
Share on other sites

Now kylania, will that mean I have to turn it on manually from the outside?

Edited by failtolawl

Share this post


Link to post
Share on other sites

No, that will turn on the engine of target instantly from anywhere. Basically "spawns with engine on" :)

Share this post


Link to post
Share on other sites

Alright, so what do I need to do for multiple vehicles with engines off, do I add a 1 or 2 somewhere in the code?

Share this post


Link to post
Share on other sites

Easiest is to just use the Armored Target (lockable) object. Then use a respawn script or just set it's damage to 0 via a trigger or something.

Put down a bunch of the Armored Target (lockables). Put a GameLogic near the middle with this as it's init field:

armorTargets = nearestObjects [this, ["TargetFakeTank_Lockable_EP1"], 900];

Adjust 900 so it covers the full range of targets. Then a Radio Alpha trigger with this as it's onAct to reset the range:

{_x setDamage 0} forEach armorTargets

Edited by kylania

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  

×