Home   Help Search Login Register  

Author Topic: Respawnpoint!  (Read 1525 times)

0 Members and 1 Guest are viewing this topic.

Shogunmaster

  • Guest
Respawnpoint!
« on: 11 Oct 2003, 15:54:36 »
Hey Guys,
I got a problem, I have a respawnpointscript but in my mission the westunits have to start at a higher position then the east, what can I do? Can you write me a script?
My respawnpointscript now:
respawn=3;
respawndelay=5;

onloadintro = ""
onloadmission = ""
debriefing =  1
showWatch =  1
showCompass =  1
showNotepad =  1
showGPS =  1
showMap =  1
onLoadIntroTime = true

PS: Can somebody teach me in scripting or show mw where I can learn that?

Shogi

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Respawnpoint!
« Reply #1 on: 11 Oct 2003, 16:38:44 »
Hello Shogunmaster,

Here be your link to the world of scripting knowledge:
http://www.ofpec.com/editors/browse.php?category=1_3


What about west having to start a higher ground than east? Did you use a mission editor Wizard?
The base (number 3) respawn works with  markers named as respawn_west and respawn_east (and what ever sides you'd have). The units respawn to the spot where the marker is, and if it's size is more than 1, they'll respawn randomly in the marker area.
So what you'd do is find the markers in the editor and just move them to appropriate locations.
Not all is lost.

Shogunmaster

  • Guest
Re:Respawnpoint!
« Reply #2 on: 12 Oct 2003, 00:15:47 »
mmh.. I know that allready.
My problem is, that the westunits are starting at a ....Carrier ( I hope It's the right word for german: Flugzeugträger), and wenn I make the respawn_west marker there they restart in the water -> death, restart in water -> deathh .. etc. so what can do that the wastern units starting on the Carrier? :-\

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Respawnpoint!
« Reply #3 on: 13 Oct 2003, 04:22:46 »
Hello

I'm no expert, but I saw a script in the library (follow Artak's link) that runs only when the player is dead (one of the player respawn scripts but I can't remember which one, sorry   :( ) that might be useful for you.

In THAT script, the player is refitted with his full kit when he comes back to life, rather than getting the default weapon with one magazine.  What YOU want to do is have the script load the player on to the carrier in the spawnpoint when they come back to life.

Again, I'm no expert, but I think that you want all your player characters to be running something like this  -


#loop

? !alive player: goto "backoncarrier"
~1; any #, so long as it is greater than your respawndelay !

goto "loop"


#backoncarrier

player moveInCargo "Carrier"

exit


I'm sure that I missed something and you should probably use the @ function ( as in @ !alive player) but I'm still not sure how to use that one so I'll leave it to better minds than my own to fill you in.   :D

Good Luck !



Roni


Offline CrashDome

  • Members
  • *
Re:Respawnpoint!
« Reply #4 on: 13 Oct 2003, 06:47:53 »
Easy!

Make a trigger:
set to none, repeatedly

Condition line:       (side player == West) && (!alive player)
Activation Line:      ..nothing
Deactivation Line:  player setpos [getpos player select 0,getpos player select 1, <height>]

where <height> is what you need.

no scripting needed, but a script could be written to do the same with a bit more work.

Note: you still need to have a respawn marker and respawning set up correctly.
« Last Edit: 13 Oct 2003, 06:48:45 by CrashDome »

Shogunmaster

  • Guest
Re:Respawnpoint!
« Reply #5 on: 14 Oct 2003, 21:57:54 »
Thank U guys!!!!!
Now my LAN Party can started, that'll be much fun! MUAHAHA!
 :D