spawning triggers?

Post your scripting questions / solutions here

Moderator: Moderators

lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

okay, that would be a lot easier, i'll try that out. :D
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Post by agentmad007 »

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 have trouble to understand the 2 3d point to define the scale .

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?
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

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)
Image
agentmad007
Brigadier General
Posts: 570
Joined: Tue Feb 24, 2004 3:52 pm

Post by agentmad007 »

Ok thank you ;)

is there a way to take out a model or a trigger with the script ? :oops:
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

So you can add a trigger via script? I did not know that...
Image
OxYdO666
Corporal
Posts: 30
Joined: Wed Jul 07, 2004 5:26 pm

Post by OxYdO666 »

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 
Post Reply