Trigger that detects entities?

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Trigger that detects entities?

Post by F |Madness| U » August 16th, 2013, 2:09 pm

Is there a type of trigger that detects non-player entities?

I made a trigger multiple and tried moving a script_origin backwards and forwards through it (slowly) and it didn't detect it at all. I was simply using trigger waittill("trigger"); iprintlnbold("Testing"); and nothing was ever printed. I guess most triggers only detect players?
-

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: Trigger that detects entities?

Post by megazor » August 16th, 2013, 3:02 pm

Not possible.

But I think the thing you long for can still be implemented. You only have to describe it to megazor. And smart megazor will think of it and most likely come up with a sexy idea.

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Trigger that detects entities?

Post by F |Madness| U » August 16th, 2013, 5:07 pm

Possibly, I wanted to make a basketball court with a trigger on the court to make the ball bounce (this could be done by checking ball.origin[2]) and to detect when it goes goes through the hoop(s).
-

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Trigger that detects entities?

Post by F |Madness| U » August 16th, 2013, 5:13 pm

Hmm, nevermind I can just make it so it gets stuck in the hoop at a certain origin and check for that origin.
-

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

Re: Trigger that detects entities?

Post by Drofder2004 » August 16th, 2013, 7:52 pm

Why not just detect the explosion of the grenade?
(this was in jm_denmark)
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

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Trigger that detects entities?

Post by F |Madness| U » August 17th, 2013, 5:24 pm

Drofder2004 wrote:Why not just detect the explosion of the grenade?
(this was in jm_denmark)
It wasn't going to be with a grenade, but thanks anyway I didn't know you could do that.
-

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Trigger that detects entities?

Post by Rezil » August 17th, 2013, 8:18 pm

Trigger == checking the entity origin within some XYZ values and executing some code if the entity is within those values.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Trigger that detects entities?

Post by F |Madness| U » August 17th, 2013, 8:51 pm

True, true. I was under the impression that a `home-made` trigger (checking values every 0.01s - shortest time to be as accurate as possible) would cause more server strain than a built in trigger, as I thought waittill("trigger") was some kind of immediate detection, rather than constantly checking values.
-

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

Re: Trigger that detects entities?

Post by Drofder2004 » August 18th, 2013, 5:53 am

Shortest time is 0.05 (1/[server frame rate]) and a single loop repeating every 0.05 is not going to be even remotely noticeable.
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

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests