OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Shogunmaster 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
-
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.
-
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? :-\
-
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
-
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.
-
Thank U guys!!!!!
Now my LAN Party can started, that'll be much fun! MUAHAHA!
:D