vixen 10 Posted May 20, 2011 hi, is there a way to respawn each unit to a different respawnpoint. Share this post Link to post Share on other sites
sxp2high 23 Posted May 20, 2011 Yes. Just add this eventhandler to the units: _respawnEH = Unitname addMPEventHandler ["MPRespawn", {_this setPos newRespawnPos}]; Share this post Link to post Share on other sites
vixen 10 Posted May 20, 2011 it does not work :( i suspect that i have to put this in the init-line of the unit and that newRespawnPos is the name of the marker where i want to respawn? Share this post Link to post Share on other sites
demonized 20 Posted May 20, 2011 it does not work :(i suspect that i have to put this in the init-line of the unit and that newRespawnPos is the name of the marker where i want to respawn? No, newRespawnPos is not another marker, sxp2high asumed you knew scripting. what he meant was that its a new position so it would be like below, you define it before. newRespawnPos = getMarkerPos "newMarker1"; but this below will work just fine instead. _respawnEH = Unitname addMPEventHandler ["MPRespawn", {_this setPos (getMarkerPos "newRespawnMarker")}]; Share this post Link to post Share on other sites
vixen 10 Posted May 21, 2011 No, newRespawnPos is not another marker, sxp2high asumed you knew scripting.what he meant was that its a new position so it would be like below, you define it before. newRespawnPos = getMarkerPos "newMarker1"; but this below will work just fine instead. _respawnEH = Unitname addMPEventHandler ["MPRespawn", {_this setPos (getMarkerPos "newRespawnMarker")}]; i'm starting to learn it.:p but i thougt i got it, but apperently not. this is what i did: my description looks like this: class Header { gameType = COOP; minPlayers = 1; maxPlayers = 16; }; respawn=3 respawndelay=5; respawndialog=true; newRespawnPos = getMarkerPos "ground"; then i tried the code: _respawnEH = Unitname addMPEventHandler ["MPRespawn", {_this setPos newRespawnPos}]; in my init of the unit, not good. then i put it in the init.sqf but once again, not good. what is wrong? sorry for the burden, but without question you will learn nothing:) Share this post Link to post Share on other sites
buliwyf 4 Posted May 21, 2011 Here will find answers to your questions. ;) Share this post Link to post Share on other sites
demonized 20 Posted May 21, 2011 (edited) newRespawnPos = getMarkerPos "ground"; _respawnEH = Unitname addMPEventHandler ["MPRespawn", {(_this select 0) setPos newRespawnPos}]; goes in init.sqf, never in description.ext, also slight modification, try this. Edited May 21, 2011 by Demonized Share this post Link to post Share on other sites
vixen 10 Posted May 22, 2011 tnx for the information so far :) but i still don't get it :( there are 6 teams with 3 units. my unitnames are x1, x2, x3, etc there are 2 markeres : -ground- and -air- 4teams have to respawn at -ground- and 2teams have to respawn at -air- what is -respawnEH-? and is there somewhere a list of this things? Share this post Link to post Share on other sites
demonized 20 Posted May 22, 2011 addMPEventHandler ArmA_2:_Event_Handlers Share this post Link to post Share on other sites
vixen 10 Posted May 22, 2011 I had already seen these links, but they do not clarify much for me. the problem is that i do not understand how it works. in my opinion there is stil 1 marker. i put the code in my init like this: newRespawnPos = getMarkerPos "ground"; _respawnEH = x1 addMPEventHandler ["MPRespawn", {(_this select 0) setPos newRespawnPos}]; _respawnEH = x2 addMPEventHandler ["MPRespawn", {(_this select 0) setPos newRespawnPos}]; _respawnEH = x3 addMPEventHandler ["MPRespawn", {(_this select 0) setPos newRespawnPos}]; _respawnEH = x4 addMPEventHandler ["MPRespawn", {(_this select 0) setPos newRespawnPos}]; this does not work. i only can make it work for 1 unit and 1 marker. i stil have -respawn=3 respawndelay=5; respawndialog=true; in my description. Share this post Link to post Share on other sites
demonized 20 Posted May 22, 2011 I had already seen these links, but they do not clarify much for me. the problem is that i do not understand how it works. in my opinion there is stil 1 marker. i put the code in my init like this: newRespawnPos = getMarkerPos "ground"; _respawnEH = x1 addMPEventHandler ["MPRespawn", {(_this select 0) setPos newRespawnPos}]; _respawnEH = x2 addMPEventHandler ["MPRespawn", {(_this select 0) setPos newRespawnPos}]; _respawnEH = x3 addMPEventHandler ["MPRespawn", {(_this select 0) setPos newRespawnPos}]; _respawnEH = x4 addMPEventHandler ["MPRespawn", {(_this select 0) setPos newRespawnPos}]; this does not work. i only can make it work for 1 unit and 1 marker. i stil have -respawn=3 respawndelay=5; respawndialog=true; in my description. you do realize that you "HAVE" to actually create 4 different markers??? [b]newRespawnPos1 = getMarkerPos "ground1"; newRespawnPos2 = getMarkerPos "ground2"; newRespawnPos3 = getMarkerPos "ground3"; newRespawnPos4 = getMarkerPos "ground4";[/b] _respawnEH = x1 addMPEventHandler ["MPRespawn", {(_this select 0) setPos [b]newRespawnPos1[/b]}]; _respawnEH = x2 addMPEventHandler ["MPRespawn", {(_this select 0) setPos [b]newRespawnPos2[/b]}]; _respawnEH = x3 addMPEventHandler ["MPRespawn", {(_this select 0) setPos [b]newRespawnPos3[/b]}]; _respawnEH = x4 addMPEventHandler ["MPRespawn", {(_this select 0) setPos [b]newRespawnPos4[/b]}]; Share this post Link to post Share on other sites
vixen 10 Posted May 22, 2011 no, i didn't. tnx for the info and the time. it has helped me a lot.:) Share this post Link to post Share on other sites