Exotic train Created 20 years ago2004-10-06 02:37:15 UTC by [VDC] Rad Brad [VDC] Rad Brad

Created 20 years ago2004-10-06 02:37:15 UTC by [VDC] Rad Brad [VDC] Rad Brad

Posted 20 years ago2004-10-06 02:37:15 UTC Post #64322
I am trying to create a func_train that will roll with a rider onboard. If the rider falls off, the next path_corner is going to activate a multimanager that, in turn, activates two funcs (of some nature) that are just after each path_corner to reset the train. I don't want it controllable, by the way. I want the first func to kill the second func and the second func to kill the train, if it's not killed by the first. Like a deadman's switch. If the rider is on the train, when he passes through the first func (or trigger), he's still onboard, and it kills the "train killer". If he's not onboard, the "train killer" isn't deactivated, and it resets the train. That's the concept.

I've been racking my brain for the correct entities to use and it seems like I can't do this. I don't think I can kill a train in motion and have it return to it's starting position. BUT I know these guys at this one website that are extremely talented and intuitive, so I thought I'd ask them before giving it up. Any hints towards funcs or triggers to accomplish this would be (as always) appreciated! Thanks!
Posted 20 years ago2004-10-06 04:19:52 UTC Post #64338
What about trigger_changetargets? I don't know exactly how these behave when used on a path_corner, but I do know they can change the target of a func_train. It has to be stopped and then activated again before it moves to it's new location though. As far as I can remember... I can't test now since I'm on school, so... good luck!
Posted 20 years ago2004-10-06 18:55:01 UTC Post #64553
I think I need a timer that triggers a "shut off" if it is NOT triggered. It's hard to trip a trigger if you're not there, and that's what I need. Just thinking out loud.
Posted 20 years ago2004-10-06 19:48:02 UTC Post #64555
Let me try to say this in my words.
You want a train that stops, or returns to it's starting position, when the player jumps off. But why do you kill it then?

Here's my version (for stopping the train):

Every path ent for the train triggers a trigger_relay that would trigger the train off. For each path_corner there is a trigger_once that is placed so that the player enters it just before the train reaches the path ent. This trigger_once killtargets the according trigger_relay.
To prevent the player from activating a trigger_once while he is not on the train, use the train as the master for the trigger_onces.
The train should also move faster than the player, so it gets switched off before the player could reach the next trigger_once.

I hope this is understandable.

If you have further questions like this, please ask. I love those things. :)
Posted 20 years ago2004-10-07 01:00:10 UTC Post #64561
Here's what I'm thinking, idea-wise. I want to make a skate park, and I want, in the main tube, a board that will travel the tube - a train, so that it can't be slowed or reversed. I will "path" it so that it's a trick ride, but I don't want the board to continue on the trick path if the original rider is lying in a gutter, bleeding out. So if he falls off, I don't care if the board rolls to the next path_corner - it'll be close by and look natural. But once the train triggers the path_corner, I'd like some entity to know there is no rider. So I need to trigger something to "kill" the train. Keep in mind that I'm not sure if "Kill Target" will remove it or reset it. I'm looking for the resetting of the train. I'm thinking that the train turns something on with the path_corner that is just in front of the path_corner. That "thing" is only on for a second, and if the player is on the train, he'll go through it. If he goes through it, the train is allowed to continue. If he's not on the train, he doesn't trigger it, and the train is reset. I'm also thinking that there needs to be two "somethings" in front of the path_corner, so that if the player is on the train, and proceeds through the first something, it turns off the second "something". The second "something" being the thing that resets the train.

Reading what you've written, I can see the concept you're going with. The forseeable problem in your scenario, for my map, is that it's multiplayer. And the trigger_onces would all be on at the same time. Someone else could conceivably reset the train by stepping or jumping through a trigger_once that is further down the line. I did not think of killing it before the path_corner, though, and will give that alot of thought. What I'm proposing is that at each path_corner, the rider/non-rider train resetting mechanism is turned on for a second (two at most) and turned off as the train and rider move to the next path_corner. That way, the "action" is very close to the player, happens fast, and 99% of the time, a different player can't affect it. If a different player does affect it, people understand if it happens once in a blue moon. It's not an exact science. But if different peeps can stop the train all the time, people will know it's a crappy job.

I will read up on trigger_relays, onces, and multiples.

As a side question, I was thinking of starting the train with a tiny "AAAtexture" trigger that would reset after the train's journey was complete. Do I need to toggle this to make it "reset-able"? Is there a method for reseting the train without an "on/off" switch?

I appreciate the response. I like these problems as well, but it seems each time I create a map, I have one "problem" that is just bonkers and just a touch out of my league.
Posted 20 years ago2004-10-07 13:23:24 UTC Post #64658
Oh my goodness!
You want that in a multi-player map. Then it's very very unlikely that it will work.

As already CP said, I also think it is possible to affect the train with a trigger_changetarget.
Two version.
First one. Trigger_changetargets can change the 'next stop target' of a path entity:
The first path ent has it's 'teleport' flag checked. If the player is off the train, the next path ent will change the 'next stop target' of the following path ent. The new target will be the start of the path. One moment later, another trigger_changetarget will give the path ent with the changed target, back its original target.
This requires many entities.
Second one. Trigger_changetargets can change the destination of the train:
If the player is off the train, the next path ent will change the movement destination of the train. The train will be put back to the start. Here you also need the 'teleport' flag.
Requires less ents.

But now comes the major problem, multiple potential activators for the train resetting sequence. It is impossible to make it 100% protected from bugs and errors. You would have to use a complex system of trigger_multiples to make sure that only the train driver can activate the resetting.
Firstly, you need one master for each trigger_multiple that is activated while the train is between the two according path ents and deactivated when it leaves this area. Then you need one trigger_changetarget and a trigger_relay for each part. The trigger_relay would initiate the resetting of the train, unless the player activates the trigger_changetarget through the trigger_multiple. Then again, after the trian leaves the area, the trigger_relay needs to get its original target back.

All this is extremely complicated to put into effect and would have many potential error sources.

In other words - forget it.

This is too much for the HL engine. I would work in theory and with alot of problems. But I think this would be too much efforts for a too small result.
Posted 20 years ago2004-10-07 15:25:13 UTC Post #64687
Could you make the area outside the train with scrolling textures to give the appearance of simple movement?
Posted 20 years ago2004-10-07 20:09:51 UTC Post #64736
The train is a skateboard so there is no "outside" the train. The player is intending to ride "on the outside" of the train, so no.

I was just intending the start trigger to reset after, say, 30 seconds... that way it couldn't be started again. The problem in that is I believe the start trigger needs to be toggled in order to reset the train.

It is quite an undertaking, you are correct. I will give that up. I add too much of that crap to a map as it is.

Thanks!
Posted 20 years ago2004-10-08 02:55:01 UTC Post #64787
Perhaps you should just go with a func_tracktrain... as in 'subtransit'... I think that will suffice. For skateboards and the like, you could always head over to HL2... as soon as there's a DM mod out there... ;)
Posted 20 years ago2004-10-09 10:49:03 UTC Post #65048
The only reasons I don't like the func_tracktrain is that the speed and direction is controllable.

1. In a downward sloping tube, a skateboard climbing at high speeds looks peculiar.

2. Creating the "reset" structure would be quite a lot larger nightmare than it already is, the least of which is the skateboard being left at the peak of an arc, where it is defying gravity, just waiting to proceed instead of returning to "start".

I'm just not going to put it in. Not that I wouldn't eventually get it to work, but I need to learn the limitations of the game engine, my time, and my knowlege. This is a good thing, since on my last map, I spent three weeks creating something I needed to cut from the map completely.
You must be logged in to post a response.