Jump to content
SoullessFenrir

Respawn Script not working properly

Recommended Posts

I've hunted around for some sort of answer for this but have found nothing. I'm not exactly and expert when it comes to the editor so I'll explain the situation.

I've been creating a mission in which I want to remove the fatigue system which I have done through a lobby parameter. That part seems to work fine. Now as for the respawning. I've placed the marker with "repsawn_west" and I've got "respawn = BASE;
respawnDelay = 10;" in my description.ext and blah blah blah.

When I die or choose the respawn option in the mission I don't respawn as the unit but in the death screen I can see that the unit itself has respawned. Which leaves me with the option to quit the mission and nothing else.

I'll hazard a guess that it's something to do with my attempt to remove fatigue that's causing it.

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

respawn = "BASE";

OR

respawn = 3;

I dont see any quotation marks around BASE, is that just omitted in your post or does it look like that in your description.ext?

Share this post


Link to post
Share on other sites

I've hunted around for some sort of answer for this but have found nothing. I'm not exactly and expert when it comes to the editor so I'll explain the situation.

I've been creating a mission in which I want to remove the fatigue system which I have done through a lobby parameter. That part seems to work fine. Now as for the respawning. I've placed the marker with "repsawn_west" and I've got "respawn = BASE;

respawnDelay = 10;" in my description.ext and blah blah blah.

When I die or choose the respawn option in the mission I don't respawn as the unit but in the death screen I can see that the unit itself has respawned. Which leaves me with the option to quit the mission and nothing else.

I'll hazard a guess that it's something to do with my attempt to remove fatigue that's causing it.

Any help would be greatly appreciated.

Are your running this mission on a dedicated sever?

Share this post


Link to post
Share on other sites

This is very vague, any chance you could share a very basic non working mission with your setup(including your fatigue) so we can have a look maybe able to suggest something better than 100 guesses.

Share this post


Link to post
Share on other sites
"repsawn_west"

Guess that's just a typo in the post?

Share this post


Link to post
Share on other sites

@R3vo - Yes it was, my bad.

@Iarrow - Made the mission, not actually sure how to go about sharing it. But I can tell you that everything seems to work on that one. No fatigue, working respawn. All the same stuff is in there.

Share this post


Link to post
Share on other sites

Anyway I'll just put it here:

description.ext:

class Params
{
    class Fatigue
    { // paramsArray select 0
            title = "Fatigue:";
            values[] = {0,1};
        default = 0;
            texts[] = {"OFF","ON"};
    };
};

respawn = 3;
respawnDelay = 10;

fatigue.sqf:

if (isDedicated) exitWith {};
waitUntil {!(isNull player)};
while {true} do {
    if (isNull player) exitWith {};
    player setFatigue 0;
    sleep 5;
};

init.sqf

if ((paramsArray select 0) == 0) then {execVM "fatigue.sqf";};
 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×