OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: sharkattack on 14 May 2009, 19:35:51
-
guys im trying to create a bomb blast at a position of a truck
this works fine
bomb = "Bo_GBU12_lgb" createvehicle getpos truckplayer
however id like to raise the blast a few meters from the truck ...
what would be the best way to do this
many thanks in advance
-
bomb = "Bo_GBU12_lgb" createvehicle [getpos truckplayer select 0, getpos truckplayer select 1, (getpos truckplayer select 2 + x)]
where x is the number of metres above the truck the "boom" should go.
-
hi mate
Error returned
type any, expected number
many thanks
-
try this untested ,
bomb = "Bo_GBU12_lgb" createvehicle ( truckplayer modeltoworld [0,0,4])
i presume your truck is named truckplayer in editor ?
adjust the first zero , positive number for west , negative for east
adjust the first zero , positive number for south , negative for north
adjust the 4 for more height
this wont change the blast height , for that you will need to collide your bomb with another object before it hist the truck .i am sure mandoble made a thread about that many moons ago.
good luck
DB
-
You need to do what bedges said, except change:
(getpos truckplayer select 2 + x)
into:
(getpos truckplayer select 2) + x
What bedges typed makes the scripting engine try to select (2+x), since + has a higher precedence than select.