Jump to content
Sign in to follow this  
stupidwhitekid75

Chopper Land at Smoke

Recommended Posts

Was wanting to know if there's anyway to make it so that a chopper will land and unload troops if a certain colored smoke grenade is deployed for an sp mission.

I want to set up a battle where a helicopter will fly in at a certain time, and if a green smoke grenade is present on the ground (spewing smoke) the helicopter will land at that point and unload, then fly away. However, if a red smoke grenade is on the ground, the helicopter will ignore the transport unload waypoint and fly away, not unloading the troops.

I would be the one deploying the smoke, deciding whether or not it's too hot for the helicopter to land or not, while the AI controls helicopter and troops on board the helicopter.

If scripts are involved..well..not to good with them myself but I can probably figure it out. If anyone has any idea on how to achieve this I'd be very grateful :D

Share this post


Link to post
Share on other sites

I think all this is to do with event handlers. I created a thread about this subject a while ago and got rather confused. I wish you better luck!

Share this post


Link to post
Share on other sites

Hi,

Yes, and ofc the best solution is doing it by script.

All you need is:

  • Make the chopper move to the pickup position
  • When he arrives just use something like nearObjects to detect the smoke (You can even create a little function that returns the color of the smoke, using typeOf command))
  • When a green smoke is found, create a Invisible H in the position of the smoke, using createvehicle and getPosATL of the smoke
  • Then make the chopper land using the command land if smoke green found, else move away

_neo_

Share this post


Link to post
Share on other sites

Helped a little bit..still not entirely understanding how it can be done. Can anyone explain this in a little more detail for me?

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  

×