OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Danakin1 on 05 Jun 2008, 19:05:27

Title: Scripting problem and question.
Post by: Danakin1 on 05 Jun 2008, 19:05:27
So I'm trying to write a script so that the Pilot Gets into Airwolf and takes off.  Right now I'm just trying to get the pilot into Airwolf. 
I named the pilot/unit dan and I named Airwolf/unit lady...  in the script, should I or can I call the airwolf, lady?
something like , dan DoMove GetPos Object (lady)
I'm trying to put this into the script that I have.  The script is having the camera pan around airwolf and I wanted pilot (dan) to get into or move to airwolf (lady).  Will OFP recognize this or does Airwolf need be be helicopter or something like that?




Title: Re: Scripting problem and question.
Post by: h- on 05 Jun 2008, 22:06:30
Even though this is about a specific addon to be used this is 'just' a normal editing/scripting question so I'll moved this here :)

Quote
can I call the airwolf, lady?
Sure, there's only a few words you can't use as a name, at least almost all scandinavian letters won't work for example.

To get the pilot to board the chopper take a look at the orderGetIn (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=o#241) command (and the comments given).
Title: Re: Scripting problem and question.
Post by: Gcfungus on 06 Jun 2008, 00:04:00
Could you not just use waypoints, and then use points in the script which wait, such as:
Code: [Select]
@airwolf in lady == true
-=GC=-Fungus1999
Title: Re: Scripting problem and question.
Post by: Danakin1 on 06 Jun 2008, 01:10:20
I first tried waypoints and triggers, but I have no control over what the pilot does and it's sometimes pretty strange what the pilot does before getting into the chopper, like crawling on the ground and stuff like that. 
I want to control all the aspects so that I can control the cutscene.
Title: Re: Scripting problem and question.
Post by: schuler on 06 Jun 2008, 02:02:53
once again a AI prob
put in init or cutscene
dan setbehaviour "CARELESS"; dan setspeedmode "LIMITED"       in his init, this will make him walk, then change it to NORMAL in a waypoint in you like
cheers schuler
Title: Re: Scripting problem and question.
Post by: Gcfungus on 06 Jun 2008, 08:31:17
I meant, conrtol the ai through waypoints, and use a camera script to watch.
Title: Re: Scripting problem and question.
Post by: schuler on 06 Jun 2008, 09:00:21
@Gcfungus if he wants too, he can add himself as player co-pilot to watch aswell. i often do this myself under command of an officer to see how he works in a mission.
Title: Re: Scripting problem and question.
Post by: Planck on 09 Jun 2008, 19:13:25
*Locked*


All future replies to this should go here (http://www.ofpec.com/forum/index.php?topic=31587.0).

@Danakin1

Please only start one topic about a question, we don't like multiple topics about the same problem from the same person, things can get confused quickly.   :good:   :cool2:


Planck