OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: death_cannon on 18 Apr 2004, 12:50:54

Title: Basic question
Post by: death_cannon on 18 Apr 2004, 12:50:54
Yes, hello there, I used to use the Editor alot, but that was sometime ago and now I have forgotten everything, anyway, some questions:

I have 4 Soldiers sitting around a fire, at night, and I want them to have a chat 1st, but after a minute or 2 minutes I want a plane to fly over ahead and crash somewhere near by....

The Soldiers don't have to sit down, I can live with them having to stand up, it is just the Plane suddenly appearing, and the conversation that I need. Oh yeah, it is an A10.

Cheers, Laurie.
Title: Re:Basic question
Post by: myke13021 on 18 Apr 2004, 15:56:42
ok, let's see if i can help...

for units to sit down use playmove (for smooth animation) or switchmove (for instant switching to)...as i guess they have to be settled down from the beginning, i would try this:

unitName switchMove "Effectstandsitdown"

about the plane...as you say, you want it to fly over and to crash...hmmm...crash a plane...only thing i can imagine is, to createvehicle the plane, createunit the pilot, moveindriver the pilot into the plane, setpos it from where you want it to fly, setvelocity to give it start speed (or it risks to crash immediately), give it a move command to fly desired direction...and to make the plane crash, do a deletevehicle on the pilot...

you might to have play around with values to get the timing as you like it.

If i find the time i'll try to write a script for you....but i think you see the idea behind it.
Title: Re:Basic question
Post by: myke13021 on 18 Apr 2004, 16:49:49
ok, out of my head i wrote this down...maybe not the best script but it does the job.....explanations are in the script.

:edit:
click this link below
Title: Re:Basic question
Post by: death_cannon on 18 Apr 2004, 18:29:04
Ah cheers my good man, I will test all that out immediatly.