I've been trying to use a target_counter to trigger an event in my map, but have been unsuccessful in getting any results.
I've read this tutorial here: Map-Craft - Tutoriaux but I wish to trigger the counter with func_walls or func_useables.
Is this possible?
It's possible. However, target_counter has a bug that makes it only activate once, so if you want it to work multiple times, you'll need a script.
Do you mind posting a rundown of what you are trying to create, or would that be too much of a spoiler? =p
Oh, yeah sure. :)
I'm trying to make it so that there are three columns that are venting a generator, and when you turn them all off, it overheats and explodes.
That's why I want to use the counter, so that it only explodes when all three are off.
I wanted to avoid scripting, but if I have to...:uhm:
Well, the question is, how do you turn the columns off? If they can be toggled, then yes, you will need a script to do this.
There are other tricky methods that will work...but they waste entities. If you need help with a script, never fear, there's a bunch of scripters lurking herebouts.
At the moment they're controlled by func_useables and can only be used once.
I was tossing up the idea of blowing them up too, but I'm using a base jk3 model that hasn't got a 'broken' model, so I gave that a miss.
You can definitely do it with a target_counter, then.
I just noticed that I never answered your initial question. Sorry to keep you waiting...disadvantages of being online at 3 AM.
There are two ways to fire the counter when a column is used:
1: Use target_relays to make the func_usables fire off your counter as well as the column. 2: (may not work...) Add the target_counter's "targetname" to each of the columns as a "target". I'm pretty sure they can trigger it.
2: (may not work...) Add the target_counter's "targetname" to each of the columns as a "target". I'm pretty sure they can trigger it.
This is how I had it set up to begin with. :( It doesn't work.
I'm going to try the 1st method now, but I need to know how to set up a target_relay.
I have to say I'm a little confused by these little grey boxes...
Target_relay simply fires it's targets when triggered.
Using this, you can create three target_relays, one for each column. Give them the same targetnames as the columns, but give them all the same target - your target_counter.
WOOO! I got it working. The odd thing is that the counter doesn't want to fire fx_runners. Why? :confused:
I have 3 func_useables triggering 3 func_walls and target_relays, the walls and relays all with the same target names. (eg column1, column2 and column3)
The relays all target one counter, which was targeting an fx_runner, but now is targeted towards the model. Unfortunately this model has no 'dead' version, so it disappears completely when it explodes...
I would have preferred to fire an effect rather than the model, but hey...
Thanks for the help.
The fx_runner should work. Are you sure you had the path to the effect correct? Check the console for an error if you haven't already.