Jump to content
Sign in to follow this  
BEAKSBY

Respawn Template init question

Recommended Posts

Hi All,

I've added the init line below to the respawnTemplates[] = {"MenuInventory","MenuPosition"}; inside the Description file.

init="nul = [this] execVM ""max_healthstatusbar.sqf""; while {alive this} do {this enableFatigue false};"; // "this enableFatigue false;"; this does not work!

However, while {alive this} do {this enableFatigue false}; is not working.

When I set-up a separate mission to test it, in the mission file I added:

init="this enableFatigue false;";

and it works.

Do I need to add this to the mission file for my mission using the respawnTemplates?

I don't want all the units set-up under the template to have enableFatigue false, only the units where I designated it in their init field.

Share this post


Link to post
Share on other sites

I know nothibng about respawn templates, but... why you enableFatigue false in a loop? Just do it once... isn't it?

Additionally, I'm shit about scheduled and non scheduled enviroment, but that while loop on an init of a unit is not advicable...

Share this post


Link to post
Share on other sites

Ok thanks,

You're right, in the separate mission (without the respawnTemplates) I did not need the loop, so this would be the same for the mission with the respawnTemplates.

I tested without the loop and it did not work either.

Share this post


Link to post
Share on other sites

uhm, having a quick look at the respawn templates on wiki, I see nothing about inits of units.

Just a suggestion from ignorance: I assume you are using an "onPlayerRespawn.sqf" script.

There you may script what you want to do with the respawned player, depending on type, class whatever, make the enablefatigue thing.. isn't it?

Share this post


Link to post
Share on other sites

Put this in the init of the unit you don't want effected by fatigue on respawn.

this enableFatigue false;this addMPEventhandler ["MPRespawn", {_this enableFatigue false}];

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
Sign in to follow this  

×