Page 1 of 1

move bomb by script

Posted: Sat Aug 06, 2005 11:02 am
by proximo
Can somebody help me with "st renan"

I will Bot the map "st Renan" and i need to move the bomb under the


bridge so that the bots can reach it.



thanks.

Posted: Sat Aug 06, 2005 4:46 pm
by Bjarne BZR
A bomb should be pretty easy to move. You need to get a hold of the bomb targetname and its trigger. As luck would have it: in creating a bomb: you also tell it the targetname of its trigger, so here goes:

1) In the script, there should be a line like this:

Code: Select all

$panel_bomb thread global/obj_dm.scr::bomb_thinker
The first here is the targetname of the bomb model ( $panel_bomb in my example ).
So now you can write something like this:

Code: Select all

$panel_bomb.origin -= ( 0 0 100 )
...to move the visible bomb model 100 units down.

2) A working bomb should have a variable named trigger_name, so try this:

Code: Select all

$panel_bomb.trigger_name.origin -= ( 0 0 100 )
...not sure this is corret, the trigger_name variable may just be interpreted as text, and if so you need to do this instead to make sure the game refers to the trigger:

Code: Select all

$($panel_bomb.trigger_name).origin -= ( 0 0 100 )
...but try the first version first.

Hope that helps. :D

Posted: Sun Aug 07, 2005 9:55 am
by proximo
thanks a lot it work with the first version :lol: