OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: royalman51 on 17 Oct 2005, 12:45:50

Title: Simple script
Post by: royalman51 on 17 Oct 2005, 12:45:50
I'm looking for a simple script. I'm making a mission, where i have to start in a copper and diliver it to a friendly base. As soon i landed the copper and i steped out, 2 other pilots will get in the chopper and 10 seconds after that 2 officers will get in.

Title: Re:Simple script
Post by: Ding on 18 Oct 2005, 21:47:25
this seems more like you need syncronisations and waypoints more than scripts, at the least you will have to do is make some logics to trigger
Title: Re:Simple script
Post by: Trapper on 18 Oct 2005, 23:27:51
Ignoring the fact that I made mistakes, the last time I wrote scripts in forums... :)

Code: [Select]
@(helo distance airbase < 50 && vehicle player == player)

pilot1 assignasdriver helo
pilot2 assignasgunner helo
[pilot1,pilot2] orderGetIn true
~10
officer1 assignascargo helo
officer2 assignascargo helo
[officer1,officer2] orderGetIn true

exit

helo is the name of the chopper
airbase has to be the name of a unit, gamelogic ect close to the helipad
pilot1, pilot2, officer1, officer2 are the names of the ai's
execute the script at mission start

You can also do this with waypoints, syncronisation and so on, like Ding says. A script is just all this written down in a file.
Title: Re:Simple script
Post by: royalman51 on 21 Oct 2005, 12:00:46
tnx  ;D