Search the Community
Showing results for tags 'respawndelay parameter'.
Found 1 result
-
[Solved]RespawnDelay in Mission Parameter
kohara_02 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I'm trying to put the RespawnDelay value in the Mission Parameters so I can change the duration anytime before I start the game. I'm currently trying to use this function BIS_fnc_setRespawnDelay(https://community.bistudio.com/wiki/BIS_fnc_setRespawnDelay) as it says that it can "set" the respawn delay value. This is what I have. description.ext {// 22 title = "Respawn Delay"; values[] = {5, 30, 60}; texts[] = {"5","30", "Default(60)"}; default = 60; } init.sqf(not sure if I should put this in initServer or initLocalPlayer) Also the "Hint" in this code is just a tester seeing if I'm really getting the value coming from the params. _respawnCounter = "respawncounter" call BIS_fnc_getParamValue; hint format ["Respawn Delay %1", _respawnCounter]; [{_respawnCounter < 60}, 30, ""] call BIS_fnc_setRespawnDelay; Huge thanks to whoever helps. Update: Apologies for having multiple threads going up because of me, I didn't know that the other threads will be bumped up the list due to my reply. Anyways after fiddling with my code and tried searching for some related topics to this I found out that adding an event handler would do the trick and by making the Variable into a public instead of a private made it work also I used the setPlayerRespawnTime instead of the BIS_fnc_setRespawnDelay(this seems to be not working for me even though I tried putting my variable into a public). respawnCounter = "respawncounter" call BIS_fnc_getParamValue; hint format ["Respawn Delay %1", respawnCounter]; if (respawnCounter != 60) then { player addEventHandler ["Killed",{setPlayerRespawnTime respawncounter}]; } But if anyone has a shorter or better version with the same concept, feel free to share it here.- 2 replies
-
- respawndelay
- parameters
-
(and 2 more)
Tagged with: