Home   Help Search Login Register  

Author Topic: Resistance spawning in wrong place!  (Read 1351 times)

0 Members and 3 Guests are viewing this topic.

Chomps

  • Guest
Resistance spawning in wrong place!
« on: 31 Dec 2002, 07:54:10 »
Okay, so I have two markers, respawn_EAST and respawn_GUER.  I have unlimited respawn for individuals set up, so they should appear in the marker zone.

So, when I play as East, I can die as many times as I want and I will spawn in the right place.

However, when I play as Resistance, I die the first couple times and I spawn in the correct place, but after a few I start spawning in the respawn_EAST area!

I am very confused over this, tell me if you need more information.  Thanks.

Chomps

  • Guest
Re:Resistance spawning in wrong place!
« Reply #1 on: 31 Dec 2002, 08:09:14 »
Oh, I see the pinned topic now.  It is supposed to be called respawn_GUERILLA.  Ooops, sorry about that, mods.  ;D


EDIT: Okay, I changed the names to respawn_guerilla and respawn_east, and I have the same problem!  :(
« Last Edit: 31 Dec 2002, 08:15:38 by Chomps »

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Resistance spawning in wrong place!
« Reply #2 on: 01 Jan 2003, 00:51:58 »
I'm not sure why your respawning isn't working properly, and since I never make missions with infinite respawns, i don't know how to fix it.

However, as a workaround, you can try setPos'ing the unit as soon as he is alive again.  Use an event handler to check when he is killed.  Put the following code in each resistance unit's initialization field:

this addEventHandler ["killed", {_this exec "playerKilled.sqs"}]

In the playerKilled.sqs script, put the following code:

Code: [Select]
; Wait until the unit is alive again.

@ alive (_this select 0)

; Move the unit to the correct spawn area.

(_this select 0) setPos (getMarkerPos "respawn_guerilla")

exit

I have no idea if this will work.  It's just a thought.  You might have to put a very slight delay after the wait, or maybe not.  Experiment and see what works.
« Last Edit: 01 Jan 2003, 00:52:55 by Ranger »
Ranger