OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: BGrenko 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
-
My script looks like this:
? (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
-
Problem solved, thanks !!
I added the removeMagazines "M16" to my script and the selectWeapon "". It now works fine
:)