OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: cannonfoda on 16 Jun 2003, 04:40:37

Title: helicopter rescue
Post by: cannonfoda on 16 Jun 2003, 04:40:37
hey guys

here's the idea. i've got a downed pilot that needs rescuing. i wanna make him fire a smoke shell and then have a helicopter fly to him, pick him up and get back to base. all i need to know is how to make an AI fire a smoke shell and then make the chopper land near the guy.

thanks for the help
Title: Re:helicopter rescue
Post by: supergruntsb78 on 16 Jun 2003, 06:46:02
if you do a little search in the forums you will be able to find the aswers pretty fast

that kind of thingy has been explained a thousand times by now

greets supergrunt
Title: Re:helicopter rescue
Post by: SteroidG on 16 Jun 2003, 06:52:18
For AI to fire a smoke shell use this:

<name of AI dude> fire ["throw","SmokeShell","SmokeShell"]

For the chopper to go there, make a way point for the chopper and set the way point to the position of the AI guy.

Something like:

[group <name of chopper>, 1] setWPPos getPos <name of AI dude>;

Then when the chopper is at about 100 meters from the AI dude, make it land or hover really low.

With something like:

?(<name of chopper> distance <name of AI dude>) < 100 : <name of chopper> land "GET IN"


Since the default altitude of a chopper is about 50 meters, don't mesure the distance between the chopper and the AI dude for less than that.

Hope that helped :).
Title: Re:helicopter rescue
Post by: cannonfoda on 16 Jun 2003, 07:42:42
problem solved guys, thanx :D :D