Jump to content
Sign in to follow this  
H00t74

Respawning w/ Mouswheel menu Items Intact

Recommended Posts

Ok, I have tried applying the same ideas as respawning w/ the same weapons you started w/ to no avail, is there a way to have my player respawn w/ his custom menu items. It is unique to one of 28 players on each side (EAST, WEST)

I have been stuck on this for a few days now and have scavenged here and OFPEC for a solution, any help is MUCH appreciated.

Share this post


Link to post
Share on other sites

The easiest method is to create a trigger with the condition:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">alive player

and set it to repeatedly

In the activation of the trigger, have it run the script to populate the actions. Everytime the player respawns, it should run.

Atleast, that is how I remember doing it in OFP.

[EDIT] Note: this applies to ALL players. Meaning all players wil have same actions. Not sure if you want that...

Share this post


Link to post
Share on other sites

not sure i understand fully but i made a night mission and i needed playes to have goggles when they respawn and i also needed a guy to have satchel charges.

so make a file called init.sqs and put this in it

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

putunitnamehere addeventhandler ["killed",{_this execVM "givedeadgear.sqf"}];

then make a file called givedeadgear.sqf and put this in it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

if((_this select 0) == putunitnamehere)then{

waitUntil {alive putunitnamehere};

removeAllWeapons putunitnamehere;

putunitnamehere addweapon "NVGoggles";

putunitnamehere addMagazine "30Rnd_545x39_AKSD";

putunitnamehere addMagazine "30Rnd_545x39_AKSD";

putunitnamehere addMagazine "30Rnd_545x39_AKSD";

putunitnamehere addweapon "AKS74UN";

putunitnamehere addMagazine "PipeBomb";

putunitnamehere addMagazine "PipeBomb";

putunitnamehere addMagazine "PipeBomb";

putunitnamehere selectWeapon "AKS74UN";

};

now when they die and respawn they will start with exactly the gear that i specified.

I found this code somewhere on these forums and modified it for my needs. Can't find where i found it though. Just add in what equiptment you want.

hope this helps

thermos

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  

×