Home   Help Search Login Register  

Author Topic: Need Help with a Weapon Respawn Problem  (Read 1862 times)

0 Members and 1 Guest are viewing this topic.

BGrenko

  • Guest
Need Help with a Weapon Respawn Problem
« on: 05 Oct 2002, 15:06:56 »
I created a Trigger that calls a script that removes weapons and then adds magazines/weapons subsequent to a respawn. Everything seems to work just fine. My player is killed, then respawns with the desired weapons. Unfortunately, the weapons are not useable. You can't shoot them, load them, or use their scope view. You can drop them and grab the same or another weapon from a cargo area or off the ground and everthing is fine. They also work just fine if I use my binoculars first. Go figuire !

Trigger Info: axis a =10000, axis b =10000, rectangular, activation =anybody, repeatedly

condition - alive playername
on activation [playername] exec "myscript.sqs"

* I've also tried it with the condition !alive playername
and set the countdown time to equal the respawn delay and have gotten the same results


Script info:

_bob= _this select 0

removeallweapons _bob

addMagazine "XMS"
addWeapon "XMS"
; there are more weapon/magazines adds in my script.
; but you get the picture
 exit

This seems pretty basic. I figuire I'm missing something fairly simple. Any input would be appreciated

Pope_Zog

  • Guest
Re:Need Help with a Weapon Respawn Problem
« Reply #1 on: 08 Oct 2002, 14:05:23 »
My script looks like this:

Code: [Select]
? (time < 20) : exit

removeAllWeapons _this
_this removeMagazines "M16"

_this addMagazine "SteyrMag"
_this addMagazine "SteyrMag"
_this addMagazine "SteyrMag"
_this addMagazine "SteyrMag"
_this addMagazine "SteyrMag"
_this addMagazine "SteyrMag"

_this addMagazine "HandGrenade"
_this addMagazine "HandGrenade"
_this addMagazine "HandGrenade"

_this addWeapon "Steyr"
_this selectWeapon "Steyr"

and is executed by the same type of trigger by activation:
playername exec "myscript.sqs"

It works just dandy. I can't really see where you're going wrong...

Pope Zog

BGrenko

  • Guest
Re:Need Help with a Weapon Respawn Problem
« Reply #2 on: 09 Oct 2002, 03:34:07 »
Problem solved, thanks !!

I added the removeMagazines "M16" to my script and the selectWeapon "". It now works fine

 :)