Triggers

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
martijn_NL
Map Reviewer
Posts: 156
Joined: Mon Apr 14, 2003 5:33 pm
Location: The Netherlands
Contact:

Triggers

Post by martijn_NL »

Normaly a trigger is triggered by the player. But can a trigger be triggered for example by ai, vehicles or airplanes?

If it is possible how?

Martijn_NL
Mapping 4 life
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

By AI, yes, just check the 'MONSTERS' box in the entity inspector.

You can try a trigger_vehicle for the vehicles and planes but I don't know whether it works.
Image
TheShiznaeSpe
Major
Posts: 304
Joined: Wed Feb 05, 2003 11:45 pm
Location: US
Contact:

Post by TheShiznaeSpe »

it's possible to make a plane trigger a trigger-but much more difficult

make a trigger_multiple
targetname plane_trigger

make a script_model
model models/whatever/plane.tik
targetname plane1

add this to your scr:

//////////////////////////////////////////////////////////////////////////

main:

level.plane_triggering = 0
level.plane_trigger_triggerable = 1

level waittill prespawn

level waittill spawn

while (level.plane_triggering == 0)
{
if (($plane1 isTouching $plane_trigger[local.index] == 1) && (level.plane_trigger_triggerable == 1))
{
level.plane_triggering = 1
level.plane_trigger_triggerable = 0 // makes trigger not triggerable for plane
thread what_to_do_now
}

end

what_to_do_now:

iprintlnbold_noloc "I love TheShiznaeSpe."
level.plane_triggering = 0
level.plane_trigger_triggerable = 1

end

//////////////////////////////////////////////////////////////////////////
Post Reply