spawning triggers?
Moderator: Moderators
-
agentmad007
- Brigadier General
- Posts: 570
- Joined: Tue Feb 24, 2004 3:52 pm
I have trouble to understand the 2 3d point to define the scale .local.trigger = spawn trigger_multiple targetname "mytrigger"
local.trigger.origin = ( 0 0 0 ) // coordinates, or the targetname of an entitiy like $myswitch.origin.
local.trigger setsize ( -30 -30 0 ) ( 30 30 60 ) // two 3d points to define the size of the trigger from the origin point (xyz)(xyz).
local.trigger.wait = 10
I spawned a scrip_model animate/alarmswitch.tik and i want a trigger use stick on the switch .....that fit without exceed.
Could someone help me for the size ?
And other question, how could i erase triggers and models via script, if its possible?
The origin of the trigger is a single point
local.trigger setsize ( -30 -30 0 ) ( 30 30 60 )
So from the origin point x -30 is -30 units in the x direction lets call that 30 unit back y -30 -30 units in the y direction lets call that left z 0 no points up or down the z direction .
That is the fist point of the box that defines the size of the trigger ( -30 -30 0 )
x 30 forward
y 30 right
z 60 60 units up from origin point
That is the second point in the box that defines the size of the trigger ( 30 30 60 )
so you see useing those 2 points now you can define a box that is the size of the trigger .( 30 back 30 left 0 up)( 30 forward 30 right 60 up)
local.trigger setsize ( -30 -30 0 ) ( 30 30 60 )
So from the origin point x -30 is -30 units in the x direction lets call that 30 unit back y -30 -30 units in the y direction lets call that left z 0 no points up or down the z direction .
That is the fist point of the box that defines the size of the trigger ( -30 -30 0 )
x 30 forward
y 30 right
z 60 60 units up from origin point
That is the second point in the box that defines the size of the trigger ( 30 30 60 )
so you see useing those 2 points now you can define a box that is the size of the trigger .( 30 back 30 left 0 up)( 30 forward 30 right 60 up)
-
agentmad007
- Brigadier General
- Posts: 570
- Joined: Tue Feb 24, 2004 3:52 pm
Thus he look his as script???
Code: Select all
local.trigger = spawn trigger_multiple targetname "mytrigger"
local.trigger.origin = ( 0 0 0 )
local.trigger setsize ( -30 -30 0 ) ( 30 30 60 )
radiusdamage $bangalore_explosion_left2.origin XXX XXX
local.trigger.wait = 10

