Home   Help Search Login Register  

Author Topic: Tomahawk Script help  (Read 472 times)

0 Members and 1 Guest are viewing this topic.

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Tomahawk Script help
« on: 27 Jan 2004, 15:08:08 »
Need help i maid this with lots of diffent scripts
and what i added the click map option to give marker so tomahawk flys and blows at that point it says error with

Code: [Select]
"target" setMarkerPos _pos
"target" setMarkerType "destroy"

now i dont know what i have done wroung please help


Code: [Select]
_tomahawk = _this select 0
_pos = _this select 1
? isnull (driver _tomahawk) : goto "empty"
#seconds
onMapSingleClick {}
1 setRadioMsg "Null"

_pos = _this select 0

"target" setMarkerPos _pos
"target" setMarkerType "destroy"
#driverin


;? driver _tomahawk == player : exit
_nav = driver _tomahawk

~1

? (getwppos [_tomahawk,1] select 0) == 0 : goto "notarget"
_t=2
#loop0
? (getwppos [_tomahawk,_t] select 0) == 0 : goto "check"
_t=_t+1
goto "loop0"
#check
? (getwppos [_tomahawk,_t] select 1) == 0 : goto "settarget"
goto "loop0"
#settarget
_pos = getwppos [_tomahawk,_t-1]

_target = _pos

#loop1
_tomahawk flyinheight 60
? _pos distance _tomahawk < 1200: goto "loop2"
? !alive _tomahawk :exit
~0.2
goto "loop1"

#loop2
_tomahawk flyinheight 80
? _pos distance _tomahawk < 600: goto "loop3"
? !alive _tomahawk :exit
~0.1
goto "loop2"

#loop3
_tomahawk flyinheight 20
_tomahawk setvelocity [velocity _tomahawk select 0,velocity _tomahawk select 1,-(((getpos _tomahawk select 2)-25)/3)]
_tomahawk animate ["finFR", 1]
_tomahawk animate ["finFL", 1]
_tomahawk animate ["finBL", 1]
_tomahawk animate ["finBR", 1]
_tomahawk animate ["finBT", 1]
_tomahawk animate ["finBB", 1]
? _pos distance _tomahawk < 10: goto "expl"
? !alive _tomahawk :exit
? !alive _nav :exit
~0.05
goto "loop3"

#expl
~0.25
;_tomahawk exec "\H_W_Tom\scripts\manualexpl.sqs"
~0.1
_fuse = "SoldierEdeath" camcreate [getpos _tomahawk select 0,getpos _tomahawk select 1,getpos _tomahawk select 2]
"H_W_Tomahawk" camcreate [getpos _tomahawk select 0,getpos _tomahawk select 1,getpos _tomahawk select 2]
_tomahawk setpos [getpos _tomahawk select 0,getpos _tomahawk select 1,0.5]
~0.05
deletevehicle _tomahawk
~1
deletevehicle _fuse

exit

#notarget
hint "Tomahawk missile has no target!"
goto "seconds"
exit

#empty
@ !isnull (driver _tomahawk)
goto "driverin"

Unnamed

  • Guest
Re:Tomahawk Script help
« Reply #1 on: 28 Jan 2004, 05:47:54 »
Hi,

I noticed you have _pos=_This select 1 then _pos=_This select 0?

Code: [Select]
_pos = _this select 1
? isnull (driver _tomahawk) : goto "empty"
#seconds
onMapSingleClick {}
1 setRadioMsg "Null"

_pos = _this select 0

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:Tomahawk Script help
« Reply #2 on: 29 Jan 2004, 07:32:03 »
ok fixed just going to retexture and im done ill send out very soon so keep an eye out