Home   Help Search Login Register  

Author Topic: join leader if he already respawned  (Read 1440 times)

0 Members and 1 Guest are viewing this topic.

ronin-thc

  • Guest
join leader if he already respawned
« 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...

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:join leader if he already respawned
« Reply #1 on: 06 Nov 2002, 19:51:54 »
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?

"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

ronin-thc

  • Guest
Re:join leader if he already respawned
« Reply #2 on: 06 Nov 2002, 22:04:10 »
I used the group respawn.

respawn=5;

And thanks a lot, I will check it out immediately...

ronin-thc

  • Guest
Re:join leader if he already respawned
« Reply #3 on: 06 Nov 2002, 22:18:42 »
Alright, it works. That was exactly what I needed...