move bomb by script

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
proximo
Warrant Officer
Posts: 137
Joined: Mon Dec 20, 2004 8:48 pm
Location: Belgium
Contact:

move bomb by script

Post 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.
www.mohaaclantb.tk
Take a look to our server we add bots to more than 120 maps and we never stop
Server IP 91.194.236.203:12207
Image
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post 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
Admin .MAP Forums
Image
Head above heels.
User avatar
proximo
Warrant Officer
Posts: 137
Joined: Mon Dec 20, 2004 8:48 pm
Location: Belgium
Contact:

Post by proximo »

thanks a lot it work with the first version :lol:
www.mohaaclantb.tk
Take a look to our server we add bots to more than 120 maps and we never stop
Server IP 91.194.236.203:12207
Image
Image
Post Reply