Thema: Zombiemap
Einzelnen Beitrag anzeigen
Alt 02.07.2006, 22:49   #6 (permalink)
drums296
50 Beiträge
 
Registriert seit: 02.07.2006
Beiträge: 50
Standard AW: Zombiemap

Also das script sieht folgendermaßen aus !



?!Local Server : Exit

_zombie = _this Select 0

_factor = 4

_zombie SetDammage .8

[_zombie] join GrpNull

?_zombie in list PetroviceE : _zombie SetPos Getpos mark1

_zombie SetBehaviour "CARELESS"
_group = Group _zombie

_group SetSpeedMode "FULL"

_bodytime = 10

? param2 == 1:_bodytime = 1
? param2 == 2:_bodytime = 10
? param2 == 3:_bodytime = 20
? param2 == 4:_bodytime = 40

#Main
_zombie Removemagazines "Strokefist"
?(!alive _zombie) : goto "End"
?_zombie Distance _target > 200 : goto "End"
?_zombie in list PetroviceE : _zombie SetPos Getpos mark1


#FindUnit
_y = 1
_target = Leader WGroup

#FindLoop
~.01

_unit = Units WGroup Select _y

;;hint format["%1\nsld: %2",_unit,_target]

?_zombie Distance _unit < _zombie Distance _target : _target = _unit

_y = _y + 1

?!Alive _zombie : Goto "End"

?_y < Count Units WGroup : Goto "FindLoop"

?_zombie Distance _target > 170 : Goto "End"

?!Alive _target OR IsNull _target : goto "FindUnit"

?format["%1",_target] == "scalar bool array string 0xfcffffef" : Goto "End"


#Move

? _zombie distance _target <= 1 : _zombie addMagazine "StrokeFist"; goto "attack"
? _zombie distance _target > 1 && _zombie distance _target <= 5 : goto "engage"
? _zombie distance _target > 5 : _zombie doMove getPos _target

~1
Goto "Main"

#engage
;;?_target in APC:goto "main"
;;?_target in fueltruck:goto "main"

_nX = getPos _target select 0
_nY = getPos _target select 1
_zombie setPos [_nX, _nY]
goto "main"

#attack
? _zombie distance _target > 1 : goto "main"
_target globalchat "AIEEEEE get it off me!! Heeeelllpp!!"
_zombie fire "StrokeFist"
_target setDammage (getDammage _target + 0.1)
~1
_zombie removeMagazines "StrokeFist"
goto "main"

#End

~_bodytime

DeleteVehicle _zombie


hoffe ihr könnt damit was anfangen !
drums296 ist offline   Mit Zitat antworten