hey scripting gods (and goddesses, if present)
i got a little prob...i would like to use a script to insert diff patrols on a map using the createunit command. i alread know about the group problem which is discussed in another thread and i followed instructions described there to get an empty group. I created a unit and inserted into his init field: GroupAlpha=group this; deletevehicle this
as far as good...next i made a trigger with the following on activation:
["INFANTERY", "patrol1", "GroupAlpha"] exec "patrol.sqs"
the script goes as this:
; get the parameters given
_type = _this select 0
_pos = _this select 1
_group = _this select 2
; check which patrol to create
?(_type == "SPETZNATZ"): Goto "Spetznatz"
?(_type == "RPGPATROL"): Goto "RPGPatrol"
?(_type == "INFANTERY"): Goto "Infantery"
?(_type == "SNIPER"): Goto "Sniper"
; No type was found so alert creator theres a typo
_errorText = Format["ERROR: INVALID TYPE %0", _type]
Hint _errorText
Exit
; creating Spetznatz Patrol
#Spetznatz
"SoldierESaboteurPipe" CreateUnit [GetMarkerPos _pos, _group, "", 0.8, "CAPTAIN"]
"SoldierESaboteurPipe" CreateUnit [GetMarkerPos _pos, _group, "", 0.7, "LIEUTENANT"]
"SoldierESaboteurPipe" CreateUnit [GetMarkerPos _pos, _group, "", 0.6, "SERGEANT"]
"SoldierESaboteurPipe" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "CORPORAL"]
"SoldierESaboteurPipe" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierESaboteurPipe" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierESaboteurPipe" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierESaboteurPipe" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
exit
;creating RPG Patrol
#RPGPatrol
"OfficerE" CreateUnit [GetMarkerPos _pos, _group, "", 0.8, "LIEUTENANT"]
"SoldierEMG" CreateUnit [GetMarkerPos _pos, _group, "", 0.7, "SERGEANT"]
"SoldierELAW" CreateUnit [GetMarkerPos _pos, _group, "", 0.6, "CORPORAL"]
"SoldierELAW" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierEMedic" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierEMG" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierELAW" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierELAW" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
exit
;creating Inf Patrol
#Infantery
"OfficerE" CreateUnit [GetMarkerPos _pos, _group, "", 0.8, "LIEUTENANT"]
"SoldierEMG" CreateUnit [GetMarkerPos _pos, _group, "", 0.7, "SERGEANT"]
"SoldierELAW" CreateUnit [GetMarkerPos _pos, _group, "", 0.6, "CORPORAL"]
"SoldierEB" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierEMedic" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierEB" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierEB" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
"SoldierEB" CreateUnit [GetMarkerPos _pos, _group, "", 0.5, "PRIVATE"]
exit
;creating Sniper Patrol
#Sniper
"SoldierESniper" CreateUnit [GetMarkerPos _pos, _group, "", 0.9, "CAPTAIN"]
"SoldierESniper" CreateUnit [GetMarkerPos _pos, _group, "", 0.8, "LIEUTENANT"]
"SoldierESniper" CreateUnit [GetMarkerPos _pos, _group, "", 0.7, "SERGEANT"]
"SoldierESniper" CreateUnit [GetMarkerPos _pos, _group, "", 0.6, "CORPORAL"]
exit
as you see the script should create a patrol of give type but it doesn't...where's the error?
What did i wrong? Is anything in this script that could work?
Please help me, i would pray to you for the rest of my life if you do ;-)