Post: [Tutorial] Using triggers
06-03-2012, 04:19 PM #1
KingcreekS
NOTHING IS IMPOSSIBL
(adsbygoogle = window.adsbygoogle || []).push({}); How a trigger work?

A trigger work spawning the model , moving up and playing sounds.

Triggers are used for : 'moving objects', they are used to 'trigger' another entity,prefab,texture and xmodel to 'interact, spawn or hide' when walked though or activate.

----------------

So if you want to do something like a bounce betty you will need to do something lioke this:

    stepOnBetty = spawn( "trigger_radius", betty.origin, 1, 20, 10 );
stepOnBetty waittill( "trigger", i );
self playsound("veh_ac130_sonic_boom");
betty MoveTo(betty.origin +(0,0,70),0.4);


That code will move up the model you want to move

So i hope you enjoy ,
Thanks for reading.
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked KingcreekS for this useful post:

xePixTvx
06-03-2012, 04:23 PM #2
Originally posted by Bloodfocus View Post
How a trigger work?

A trigger work spawning the model and moving up and playing sounds.

Si if you want to do something like a bounce betty you will need to do something lioke this:

    stepOnBetty = spawn( "trigger_radius", betty.origin, 1, 20, 10 );
stepOnBetty waittill( "trigger", i );
self playsound("veh_ac130_sonic_boom");
betty MoveTo(betty.origin +(0,0,70),0.4);


That code will move up the model you want to move

So i hope you enjoy ,
Thanks for reading.


triggers arnt just used for 'moving objects', they are used to 'trigger' another entity,prefab,texture and xmodel to 'interact, spawn or hide' when walked though or activated. Think of it as a vstr execute.

just giving you a heads up for the correct meaning.
06-03-2012, 04:23 PM #3
ᴠevo
Banned
Simple but clear, Nice tutorial.
06-03-2012, 06:16 PM #4
Originally posted by ViiPeR View Post
triggers arnt just used for 'moving objects', they are used to 'trigger' another entity,prefab,texture and xmodel to 'interact, spawn or hide' when walked though or activated. Think of it as a vstr execute.

just giving you a heads up for the correct meaning.



I found out how to make models solid :lol:
06-03-2012, 06:39 PM #5
Originally posted by SatanicAmerican View Post
I found out how to make models solid :lol:


if its not contents 1 screw you! :carling:
06-03-2012, 07:39 PM #6
Originally posted by ViiPeR View Post
if its not contents 1 screw you! :carling:


test = spawn("script_brushmodel", origin);
test setModel(" name of brushmodel on map ");
test solid();
06-03-2012, 07:46 PM #7
Originally posted by TheHellboy View Post
How a trigger work?

A trigger work spawning the model , moving up and playing sounds.

Triggers are used for : 'moving objects', they are used to 'trigger' another entity,prefab,texture and xmodel to 'interact, spawn or hide' when walked though or activate.

----------------

So if you want to do something like a bounce betty you will need to do something lioke this:

    stepOnBetty = spawn( "trigger_radius", betty.origin, 1, 20, 10 );
stepOnBetty waittill( "trigger", i );
self playsound("veh_ac130_sonic_boom");
betty MoveTo(betty.origin +(0,0,70),0.4);


That code will move up the model you want to move

So i hope you enjoy ,
Thanks for reading.
Thats what i told you when you asked me about that trigger script on the cod4 section Winky Winky

---------- Post added at 08:46 PM ---------- Previous post was at 08:45 PM ----------

Originally posted by SatanicAmerican View Post
test = spawn("script_brushmodel", origin);
test setModel(" name of brushmodel on map ");
test solid();
That dose not work ive tryed it.
06-03-2012, 08:36 PM #8
solid() only works on brushmodels, not regular models.

If you have a "BRUSH MODEL" from the map you can use that as the model to spawn the object Winky Winky
06-03-2012, 09:20 PM #9
Originally posted by SatanicAmerican View Post
test = spawn("script_brushmodel", origin);
test setModel(" name of brushmodel on map ");
test solid();


i was going to say that this wouldn't work, but then again there's only a few brush models per map, mostly prefabs if anything.

The following user thanked Uk_ViiPeR for this useful post:

247Yamato
06-04-2012, 06:19 AM #10
247Yamato
< ^ > < ^ >
Originally posted by ViiPeR View Post
i was going to say that this wouldn't work, but then again there's only a few brush models per map, mostly prefabs if anything.


Yes, most brushmodels are from objects such as destructibles or objectives :( You can make an object solid by using those brushmodels and doing the same as how carepackage becomes solid (see _airdrop.gsc)

@TheHellBoy I simplified your examples code:

    //stepOnBetty = spawn( "trigger_radius", betty.origin, 1, 20, 10 );
//stepOnBetty waittill( "trigger", i );
self playsound("veh_ac130_sonic_boom");
betty MoveTo(betty.origin +(0,0,70),0.4);


mmm, I found the tutorial a bit confusing.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo