OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: polvy on 31 Oct 2002, 03:48:16

Title: Spawning Russian HALO Troops
Post by: polvy on 31 Oct 2002, 03:48:16

Greetings All,
I have a co-op mission in which the players are sent to the airport on Everon. Once the players reach Everon and enter a trigger I would like several Russian Troops to HALO in above the Runway. I have the HALO script in place and it works great. My question is: I've searched the Forums and have yet to find anything on this. Any help would be much appreciated.

Thanks,
~Polvy

Title: Re:Spawning Russian HALO Troops
Post by: polvy on 31 Oct 2002, 03:51:31
doh! (noob, sorry) My question is: How do I make the Russian HALO Troops appear only when the trigger is activated by my players.

tks
Title: Re:Spawning Russian HALO Troops
Post by: Wolfrug on 31 Oct 2002, 16:27:21
Ah, well, you'll need to move them into place from wherever, or possibly createUnit them (although I suggest the former). Make the activation trigger, and then (maybe) do something like thus:

"_x setPos [(getpos g1 select 0)+random 10, (getpos g1 select 1)+random 10, 1000]" forEach units enemy_HALO

This should place the group enemy_HALO randomly around a gamelogic named g1, 1 km up in the sky ;) Just change the random settings if you want them more dispersed, and the height as you see fit.

Haven't tried it though, not sure about how well random works in that kind of situation, and there's always the very-real risk of a couple of them landing on top of one another (which may cause them to entangle in one another when the chutes open...). I'll test it when I get to me copy of OFP ;)

If it doesn't work, just complain.  ;D G'luck!

Wolfrug out.
Title: Re:Spawning Russian HALO Troops
Post by: polvy on 31 Oct 2002, 23:21:36
Thank you ever so kindly. I shall put your advise to the test and post back with the results. I shan't complain. Your the only one who bothered. Thanks again.

~polvy
(sounds kinda like a po-go stick doesn't it.)
Title: Re:Spawning Russian HALO Troops
Post by: polvy on 01 Nov 2002, 10:50:13
Couldn't get it to work, but thanks anyway.

~polvy
Title: Re:Spawning Russian HALO Troops
Post by: Wolfrug on 01 Nov 2002, 18:14:58
Ah, well, as I said, complain away ;) That's what we're here for mate. :thumbsup:

So, why couldn't you get it to work? I suppose you got the standard HALO script; you can check the chute opening height, and the name of the group. So, just run that script in conjuncture with the very piece of code I gave you. Except I suggest you increase the "random"ness to about +100...much safer that way.
So:
Just place the game logic on the runway, name it, then place the russian HALO troops somewhere on some desolate island, name them, and then place down the trigger activated by whatever, and place the line of code, and then the script, into the "on activation" box. If that just makes them fall down with a thud, or not appear at all (on account of their parachutes opening early), just create another, separate trigger with the same activation as your original one, only give it a time-out of a second or so, so the peeps can get into the sky ;)

Right, hope that solves your problems...if not, post a more detailed description willya ;)

Wolfrug out.