OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: ronin-thc on 06 Nov 2002, 15:22:35
-
Hi there,
I read a lot of topics, but still one question remained:
I have a hostage situation (used "join" command) and everything works just fine. But you can respawn and if you did before activating the trigger, the hostages will not join.
I used something like:
hostages join p1
hostages is an array with 4 hostages.
It is logical that if p1 died and respawned, he is p2 or something like that though he is still the leader, so the join command cannot work.
I tried it with an array of all playable units, but the join function wants a single object.
Maybe one of you can help me...
Ronin
p.s. please excuse my school learned english, I hope you understood my question tough...
-
Ronin: your english is fine - just about as good as mine and thats the only language I speak :P
Try this...declare the leaders group in his init feild:
In p1's init feild, put [mygroup = group p1]
Then use:
hostages join mygroup
and the hostage should join the group, no matter who the leader is.
What type of respawn are you using?
-
I used the group respawn.
respawn=5;
And thanks a lot, I will check it out immediately...
-
Alright, it works. That was exactly what I needed...