Triggers...

Discuss specific custom maps as well as your own work. Seek and share mapping advice.
Post Reply
User avatar
Wintermute
DVF Member
DVF Member
Posts: 2670
Joined: Mon Sep 30, 2002 1:25 am
Location: South Wales
Contact:

Triggers...

Post by Wintermute »

Having a few problems with triggers - I'll try to describe using a simple example...

Player walks through a trigger block and a platform moves (done using a func_train and path_corner entities).

Using a trigger_once entity, works fine during first round, but doesn't appear to ever get triggered again.
Using a trigger_multiple entity, always works first round, sometimes works in subsequent rounds; but sometimes doesn't seem to trigger at all until I run around for a bit and then it eventually gets detected.


I've got similar problems with some other triggered entities e.g.
round 1 - func_train moves from point1 to point2 , pauses then moves to point3
subsequently - func_train moves straight from point1 to point3, without pausing at point2.

There are some other examples, but these are more complex and involve multi_managers, but all seem to share a similar problem with triggers not getting fired off after the first round.

Am I missing something important that I need to do in order to reset things at the start of each round ?

BTW, using Hammer to build and compile, then testing using a Steam local game.
Any suggestions ?
:shrug:
[size=84]The next generation of CS:S Maps[/size]
[url=http://www.twistedpuppy.co.uk][size=150][color=blue]www.twistedpuppy.co.uk[/color][/size][/url]
User avatar
Bullet
Senior Member
Senior Member
Posts: 1569
Joined: Sun Apr 06, 2003 12:48 pm
Location: http://www.cc-clan.co.uk
Contact:

Post by Bullet »

trigger once only allows things to happen once per map...not once per round, for once per round use trigger_multiple with wait set to -1.

if u want it to pause at a place for say....10 seconds, then do this. (you may need to play with the timing, in this example the platform would have to have reached the pause place within 5 seconds)

trigger_multiple:
wait = -1
target = platformmanager

multimanager:
targetname = platformmanager
platform = 0
platformrelay = 15

trigger_relay:
targetname = platformrelay
target = platform
delay = 0

then setup your train and corners as normal, at the point u want the platform to pause...set that corner to WAIT FOR RE-TRIGGER, then when the relay triggers it will trigger the platform again and it will move.

as i said...the timing may need altering....an also that lot may be complete shite cos i may have misunerstood / got myself confused ;)

:thumbs: HTH
Dead to the world.
217.163.30.167:27015 - [url=http://www.cc-clan.co.uk]::Convicted and Condemned::[/url] clan CSS server - http://www.cc-clan.co.uk/
::CC::
User avatar
Wintermute
DVF Member
DVF Member
Posts: 2670
Joined: Mon Sep 30, 2002 1:25 am
Location: South Wales
Contact:

Post by Wintermute »

Cheers, for the info, but I think the problem is down to the way I'm using func_train entities.

Although their position gets reset at the start of each round, the trigger for them looks like it needs to fire twice after round 1 - I'm guessing once to reset some flag somewhere and then once more to get them moving again...

Using -1 "wait-before-reset" values in my version of Hammer appears to set them to a 'use-once' state and they only ever fire off once, regardless of round re-starts, etc.

...anyway, it's made me look at what I'm doing more closely and I think I have a better way, but thanks for the info - multi-managers are next on my list of things to conquer.

:thumbs:
[size=84]The next generation of CS:S Maps[/size]
[url=http://www.twistedpuppy.co.uk][size=150][color=blue]www.twistedpuppy.co.uk[/color][/size][/url]
User avatar
Bullet
Senior Member
Senior Member
Posts: 1569
Joined: Sun Apr 06, 2003 12:48 pm
Location: http://www.cc-clan.co.uk
Contact:

Post by Bullet »

i think the valve-erc sites best for entity info, certainly got me going...

on j_streetsofrage i made a small burning fire, and it used to have some flickering street lamps but they were slightly out of time so i abanonded em

an now im making a football knife map :D

VALVE-ERC
Dead to the world.
217.163.30.167:27015 - [url=http://www.cc-clan.co.uk]::Convicted and Condemned::[/url] clan CSS server - http://www.cc-clan.co.uk/
::CC::
User avatar
-=Alex=-
DVF Member
DVF Member
Posts: 1498
Joined: Wed Aug 21, 2002 10:07 am
Location: long eaton

Post by -=Alex=- »

i read in a tutorial that you make a func_door entitie outside the map and it re sets the whole map inc. func_triggers :nuts:

/goes to look!
User avatar
-=Alex=-
DVF Member
DVF Member
Posts: 1498
Joined: Wed Aug 21, 2002 10:07 am
Location: long eaton

Post by -=Alex=- »

\skuttles back

your answer is here
User avatar
Wintermute
DVF Member
DVF Member
Posts: 2670
Joined: Mon Sep 30, 2002 1:25 am
Location: South Wales
Contact:

Post by Wintermute »

Nice one, useful trick that :)
Cheers
:thumbs:
[size=84]The next generation of CS:S Maps[/size]
[url=http://www.twistedpuppy.co.uk][size=150][color=blue]www.twistedpuppy.co.uk[/color][/size][/url]
User avatar
Sputnik
DVF Admin
DVF Admin
Posts: 4233
Joined: Fri Jun 29, 2001 12:00 am
Contact:

Post by Sputnik »

Yep, the standard way of resetting entities at the start of the round is with doors - as that tutorial expains :)

Unless you can get away with simpler mechanics (which you often can), for this sort of thing you might be best off using a door to reset a global state (use env_globals), via a trigger_relay (a trigger relay, as you may well know, lets you set something to be on or off, not necessarily just toggle it - very useful for resetting things that are not always triggered during a round). You'd then use multisource entities between the train and the env_globals (a multisource does what it's told IF a global state is activated). It's all about telling the game something (e.g. that the train is at such-and-such-a-place, then letting it do something else depending on whether this global state is "on" or "off").

Basically you get very confused adding loads of entities just for the train to work right - they can be a real pain :)
Chances are you wont actually need to and can get away with using a door to reset the trigger/train, or a changetarget so that the train goes back to pointing to the first path_corner.
Post Reply