Jump to content
Sign in to follow this  
rainbow

Rearming static weapon after respawn

Recommended Posts

Hello! I create a mission and I have encountered the problem. I would like to rearm static MG and artillery when it is out of ammo. I got a trigger for this and it works fine only to the moment when this static weapon won't be revive (by respawn script).

It's just a trigger with condition: !(someAmmo mg3)

and on activation: mg3 addMagazine "50Rnd_127x107_DSHKM"

It seems that the static weapon lost its name after revive.

Has someone the idea how to do it?

Share this post


Link to post
Share on other sites

How are you respawning the weapon?

You will need to set its name again in the respawn.

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

heli1 = _new createvehicle _startpos

heli1 setpos _startpos

heli1 setdir _startdir

?(isServer) : publicVariable "heli1";

[heli1, _delay, _pos, _dir] exec "respawn.sqs"

Like that.

If you need the full respawn script let me know. But something along those lines should do it.

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  

×