News | Forum | People | FAQ | Links | Search | Register | Log in
Mapping Help
This is the place to ask about mapping problems, techniques, and bug fixing, and pretty much anything else you want to do in the level editor.

For questions about coding, check out the Coding Help thread: https://www.celephais.net/board/view_thread.php?id=60097
First | Previous | Next | Last
Ok, Pop Quiz 
I'm setting up a future article for the blog here (like so future that I'm still finishing off the article which precedes it...), but it is a bit of a slow day on func_ so I think that's ok.

If you create a zero-wait trigger_multiple whose targetname is the same as its target then you'll get an infinite loop, which will quickly crash the map with a stack overflow. Similarly if you create a chain of trigger_relays which loop back on themsevles, the same thing will happen.

Can you devise a set-up where the same entity gets triggered more than once in the same "action", and the game continues running? (In the same action means before the function which was called to trigger things initially returns). 
Not Sure 
If this is what you mean, but I often trigger two relays at the same time, which both point at the same target but with different waits.

To open a door for a fixed period of time for example. 
Sharing 
I'll clarify with an example. If you have a trigger_multiple with

"target" "tweedledum"
"targetname "tweedledee"

and his partner

"target" "tweedledee"
"targetname "tweedledum"

If you ever walk into one of these triggers, they'll instantly crash because they just keep using each other with no delay, and the stack overflows. tweedledee targets tweedledum who targets tweedledee...

So in effect tweedledee is targetting himself. This would however be fine if either trigger had a delay - in fact a trigger which targets itself and has a delay is a very useful pattern - it's basically a clock which keeps firing the same event at a fixed time interval.

What I want to know is "can an entity indirectly target itself - cause itself to be used again, with no delay, legitimately?" That is, without crashing the engine... 
Noob Questions 
What are the max faces / verticies in a map? Do models count towards these limits? Do brushmodels and external brushmodels?

I've got a Bad Surface extents error and nothing I've done recently seems to have caused it since I've been backing up, deleting stuff and recompiling to try and find the issue but no go.

I've got 50906 faces against the standard 32767 normal limit.

The map doesn't load even in RMQe and I've been testing in fitz up until now.

If it is just too much stuff then the map may well just end up as a load of empty boxes since It's barely halfway complete and I haven't even added the end arena. 
Hm 
A delay of 0.1 would equate to next frame - it'd be heavy as fuck on the engine but it shouldn't crash outright? 
Shorter Frames 
Frames can be shorter than 0.1 seconds, and it wouldn't be a great strain on the engine to do that. The problem is that the sequence of Tweedledum and Tweedledee never ends. This is fine if there's a delay, because you've got an infinite sequence to get through, but an infinite amount of time to do it in*. If there's no delay, you have an infinite number of triggers to get through this frame, which is too much.

*Disclaimer: the Quake engine cannot in fact run indefinitely due to floating point issues. 
Random Guess 
Use a different entity than a trigger to relay the firing? A non-moving door perhaps? 
Preach: 
Probably you need to have some sort of flag or variable that cleared when the entity gets "used", and once cleared prevents the loop from repeating. Sort of like breaking out of a while(true) loop. 
 
I'm imagining if you add a trigger_counter to the loop you might be able to terminate it after a certain amount of iterations? I'm not sure if I'm understanding the question right.

trigger_relay: tweedledee targets tweedledum
trigger_relay: tweedledum targets tweedledee
trigger_counter: tweedledum killtargets tweedledee, count 10

That should be activated 10 times in a single frame, at least in theory? Can't remember how killtarget works atm, maybe it doesn't remove the entity until the next frame.
I don't really see any practical purpose to the whole deal though...
Oh and this setup can't be reused of course. 
Thinking A Bit More... 
That depends on which order tweedledee activates the tweedledum entities. If it goes for the relay first it never reaches the counter obviously, and it most definitely won't work. 
Hmm... 
building on CZG's idea...

trigger_multiple:
"targetname" "a"
"target" "b"

trigger_counter:
"targetname" "b"
"target" "a"
"count" "1"

now the trigger_multiple's use function can trigger its own use function on the same frame, but for a total of only twice, instead of infinite times. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.