Trigger Types

Tutorials for Call of Duty mapping

Moderator: Core Staff

Post Reply
User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Trigger Types

Post by Drofder2004 » February 20th, 2006, 11:03 pm

Types of triggers

In the tutorial you will be told shown different types of triggers and how they work. You will be shown "keys" and [values]. Keys are a small piece of text you can enter in the entity window (press n in CoDRadiant).
To create a trigger, simply create a brush with the texture [common/trigger] then right click the 2d window and select "Trigger<[type]" where type is the trigger type you want. The following types of trigger are available (the actual type is shown in the brackets)

Damage (trigger_damage)
Explanation:
The damage trigger can be used to detect any form of damage. Melee, bullets, explosions.

Hurt (trigger_hurt)
Explanation:
The trigger will give damage to a player touching the trigger (once every frame rate).
Keys:
dmg: Amount of damage to give per damage rate [value: number]

Look At (trigger_lookat)
Explanation:
The trigger will be activated if the player is "looking" at it.

Multiple (trigger_multiple)
Explanation:
The trigger is triggered when a player is touching it.

Use (trigger_use)
Explanation:
A trigger that must have a person "use" it (using their use key).
Keys:
hintstring: The text that is seen when the trigger is targeted [Value: text]
cursorhint: The hint icon that is displayed. [Value: see caps below]
HINT_ACTIVATE - This will display a hand icon
HINT_NOACTIVATE - This will display no icon (secret trigger)
HINT_HEALTH - This will display a health (cross) icon
HINT_FRIENDLY - This will change the colour of the crosshair to green (also a hand icon)

Accumulate (trigger_damage)
Explanation:
A custom trigger that requires a preset amount of damage before it is triggered.


Using a trigger to find a user
The person who triggered a trigger can be found by a slight modification to the scripting.
Simply change

Code: Select all

multiple_trig waittill ("trigger");
to

Code: Select all

multiple_trig waittill ("trigger",user);
The word user can be any word. This can then be used to send information to a unique person. For example

Code: Select all

user iprintln("Hello " + user.name);
For example, I trigger the trigger multiple, the code will then say "Hello Drofder".

.Map
Triggers in the provided map [Download: Here].
From left to right.
1 - Damage (Shoot it once to trigger it)
2 - Hurt (Stand on it to recieve 10 damage a second)
3 - LookAt (Aim crosshair at it)
4 - Multiple (Stand on it)
5 - Use [Activate Icon] (Press your use key)
6 - Use [NoActivate Icon] (Press your use key)
7 - Use [Health Icon] (Press your use key)
8 - Use [Friendly Icon] (Aim at it to change crosshair colour)
9 - Accumulate (Shoot it until damage is greater than 300)

All scripting can be found inside the pk3.
Enjoy.
Last edited by Drofder2004 on August 9th, 2006, 8:21 pm, edited 2 times in total.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Pedsdude
Site Admin
Site Admin
Posts: 15912
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » February 20th, 2006, 11:06 pm

Very nice m8 :)
Image
Image

profinuyasha
CJ Newbie
CJ Newbie
Posts: 88
Joined: February 21st, 2006, 1:06 am
Contact:

Post by profinuyasha » February 21st, 2006, 1:08 am

this trigger map...i tried open it with radiant...CRASHED

this map is bad need replace :evil:
Image
Image
DYOR :-)

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » February 21st, 2006, 1:38 am

profinuyasha wrote:this trigger map...i tried open it with radiant...CRASHED

this map is bad need replace :evil:
Ok, not sure what was wrong, but I have reedited, resaved, recompiled, rezipped and reuploaded. So it better work :P
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

profinuyasha
CJ Newbie
CJ Newbie
Posts: 88
Joined: February 21st, 2006, 1:06 am
Contact:

Post by profinuyasha » February 21st, 2006, 2:56 pm

Drofder2004 wrote:
profinuyasha wrote:this trigger map...i tried open it with radiant...CRASHED

this map is bad need replace :evil:
Ok, not sure what was wrong, but I have reedited, resaved, recompiled, rezipped and reuploaded. So it better work :P
here pic of error.....

Image

i use graydiant.exe
Image
Image
DYOR :-)

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » February 21st, 2006, 4:18 pm

ooh

Code: Select all

user iprintln("Hello " + user.name);
thats pretty cool, didn't know u could do that.

Everything in the zip worked fine for me btw..profinuyasha try cod radiant

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » February 21st, 2006, 6:15 pm

Graydiant will probably not work.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Phil168912
CJ Wannabe
CJ Wannabe
Posts: 1
Joined: November 24th, 2020, 6:07 am
Steam: Phil168912

Re: Trigger Types

Post by Phil168912 » November 24th, 2020, 6:40 am

do you have another download link? thx

Pedsdude
Site Admin
Site Admin
Posts: 15912
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Trigger Types

Post by Pedsdude » November 25th, 2020, 8:53 pm

I doubt he does, given the link was originally posted 14 years ago and the website it was hosted on no longer exists :o
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests