Jump to content
Sign in to follow this  
puzzola

Spawning like commander

Recommended Posts

Hi all, I'm trying to create my first mission.

I used queshkibrul island, Pedagne mod and some terrorist.

here the complete list of addons:

"ASZ_Men_DES",

"asz_cc",

"asz_needed_weapons",

"ffaa_terrorista",

"3LB_SA6",

"catracked2_bmp3",

"CAWheeled",

"CAWheeled_Pickup",

"CATracked",

"vilas_ru_veh_forces",

"ASZ_Air",

"ASZ_Tracked",

"ASZ_Wheel",

"asz_motorbike",

"queshkibrul"

I menaged to create 2 group of 12 infantrymen each one lead by an officer and set the respawn to base.

The respawn works, but sometimes I respawn again as leader of the squad, others like a member. If so I'm ordered to dismount from vehicles and can't ride any.

Do you have any idea were' the problem.

Maybe when I die alone it's all right and not if destroyed in a vehicle or with some AI?

Thank you very much

Edited by puzzola

Share this post


Link to post
Share on other sites

Sorry for upping, but anyone can say me if this is a bug or I did sometihing wrong?

One last question:

I would like to end the mission with the elimination of the OPFOR.

Is it enough if i put a trigger activated by: OPFOR, once, non present, large like the map, detected=not specified, type: end#1?

Thank you again

Share this post


Link to post
Share on other sites

The trigger worked!

For the problem in respawning it seams happening only if I die on a Mangusta

Share this post


Link to post
Share on other sites

What happens when you die is that the second in command takes over. You need to make sure you get command back, possibly by trying to set yourself to a higher rank in the editor, or to just use a command to set you as leader.

Share this post


Link to post
Share on other sites

Exactly, 2 takes command even if I am captain and He sgt.

I'll try with the script.

Must I paste it inte description interface of the leader?

Thank you very much

Share this post


Link to post
Share on other sites

No, you have to make a script that will run every time you respawn, for example by running the script by placing this addEventHandler ["KILLED", "_this execVM 'promotetoleader.sqf';"]; in the leader's init line, and have the promotetoleader.sqf script have:

_unit = _this select 0;
waitUntil {alive _unit};
group _unit selectLeader _unit;

Share this post


Link to post
Share on other sites

I paste the script this addEventHandler ["KILLED", "_this execVM 'promotetoleader.sqf';"]; in the initialization window of the officer, and create a file promotetoleader.sqf in which i paste only the script:

_unit = _this select 0;

waitUntil {alive _unit};

group _unit selectLeader _unit;

It does not work and I think is something to do with the fact the mission is Multiplayer and there's not a "unit"

I placed 2 group of six playable charachters........maybe change unit with player:confused:......I'm trying

Share this post


Link to post
Share on other sites

Did it work on the first respawn? You probabably need to also add _unit addEventHandler ... at the end of the promotetoleader.sqf to re-add the event handler to the newly respawned unit.

Anyway, you probably want to check the arma2.rpt file for errors and/or run the game with the -showScriptErrors parameter

Share this post


Link to post
Share on other sites

no way, I tried with _player addEventHandler

or _player addEventHandler ["KILLED", "_this execVM 'promotetoleader.sqf';"]; but it does work only the first time, now I try with _unit addEventHandler and then going to sleep

Thank you very much I'll tell you the result

Goodnight

---------- Post added at 01:53 AM ---------- Previous post was at 12:59 AM ----------

Victory :yay:

The problem was that I am a donkey.........in the group there was a character setted like captain like me and so.........:o

Now it works, I died three times with three choppers to be sure.

Thank you very, very much.

this has been a long night first whit the I/O analysis to chose what pbo send to pendrive and then with the respawn but I go sleeping victorious :bounce3:

Edited by puzzola

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  

×