OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: MattTheJew on 26 Feb 2003, 20:29:13

Title: Help with respawn syntax
Post by: MattTheJew on 26 Feb 2003, 20:29:13
I don't know if I'm doing this right, so any guidance would be appreciated.  I'm using a wizard-generated CTF mission to take care of respawning.  However I'm trying to make it so when a unit respawns, he'll respawn with the weapons/items I want.   For example, I have a script (thanks to Chris's OFP script editor)

; Get the unit parameter given
_unit = _this Select 0

; Strip the units current gear
RemoveAllWeapons _unit

; Add new gear to unit
_unit AddMagazine "BizonMag"
_unit AddMagazine "BizonMag"
_unit AddMagazine "BizonMag"
_unit AddMagazine "BizonMag"
_unit AddWeapon "Bizon"
_unit SelectWeapon "Bizon"
_unit AddWeapon "NVGoggles"

Exit

Then what I do is create a trigger:
a==0
b==o

Condition: Alive R1
(R1 being the unit name)
On Activation: [R1] Exec "SPECIAL_UNIT_BIZON.sqs"

I must be doing something wrong 'cause it won't work.  I just respawn with the standard respawn weapon.  I don't have to have some long script to make this work do I?  Obviously I'm a complete noob that needs some guidance.  I'd appreciate any help / direction available.
Title: Re:Help with respawn syntax
Post by: Pope_Zog on 27 Feb 2003, 13:19:49
1. Make sure you haven't misspelled the name of the script.
2. Make sure you set the trigger to Repeating.

Other than that I can't see anything wrong with your syntax.

Pope Zog