Re: trying to get a trigger_multiple to work
Posted by uberDingo on
Tue Dec 28th 2004 at 4:44am
72 posts
17 snarkmarks
Registered:
Dec 21st 2004
Im doing this for CS:S. Alright here's the scenario. Ive got a 'train' set up as a func_tanktrain and it moves along a certain path. I want it to go through some doors and have the doors open for the train without a player having to be in the train at the time.
If Im in the train then the doors open (Im using trigger_multiple with flags of 'everything' set). Where it gets stupid is if Im not on the train the train just passes right through the door like it's not even there... well that just looks retarded so Im trying to figure out how to get the doors to open for the func_tanktrain. On the trigger_multiple entity I can tell it to open for clients, clients in vehicals, clients not in vehicals, nps, physics objects or everything. Annoyingly enough my func_tanktrain isnt a 'vehical' I guess :/
The closest thing Ive come to working is putting a ragdoll in the train. Since the ragdoll is a physics object it will open the doors for the trainwhen the ragdoll is onboard. The problem comes up when the ragdoll falls out of the train due to being hit with bullets, grenades or just plain falling off when the train makes a turn at a path_track point. I can use a ragdoll constraint to stick the ragdoll to my train but he just doesnt look right.. half his body is usually in the train and whenever it makes a turn he flops around real stupid like.
Since Im makign this for CS:S Im pretty limited in what physics entities I can use since I can only incorporate the physics entities that work with multiplayer games.
Ive also tried putting an invisible func_physbox_multiplayer on my train and parenting it to the train in hopes that it would move along with the train and open doors for me but it doesnt seem to want to travel along with the train...
Any creative suggestions?
Re: trying to get a trigger_multiple to work
Posted by uberDingo on
Tue Dec 28th 2004 at 5:21am
72 posts
17 snarkmarks
Registered:
Dec 21st 2004
gezzz.. I feel like a dingo answering my own question but when I set the func_tanktrain flag 'unblockable by player' to on and make the 'trigger_multiple' flag 'Everything' then it works just perfectly :wink:
Re: trying to get a trigger_multiple to work
Posted by Zeon on
Tue Dec 28th 2004 at 5:24am
37 posts
14 snarkmarks
Registered:
Dec 22nd 2004
Location: USA
I'm picturing your scenario in my head, and I can see several possibilities:
1 - have you tried setting the doors to open via timings? If the train starts at one spot and continues in an uninterupted motion towards the doors, then you can delay the opening of the door for however many seconds it takes for you train to get there. Ex. if it takes 20 seconds to get the train from beginning to the door, then set the delay for the door open to 18 seconds.
2 - you might also be able to do something with the logic_measure_movement function. You can either measure the distance between your an entity on your train and the door, or just set invisible entities that are specifically made for tracking when the train gets close to the door. Don't quote me on that though...I've never used that func before, lol.
3 - Here's how I'd do it. Create a trigger wall that the train has to pass through. As soon as the train touches and triggers the wall, open the doors. This way you don't have to tie everything into a single trigger_multiple, and you can fiddle around with the placement of the trigger brush until it's at the right spot where the door opens in time.
Re: trying to get a trigger_multiple to work
Posted by dabait on
Tue Dec 28th 2004 at 6:04pm
15 posts
2 snarkmarks
Registered:
Dec 28th 2004
Are you using the path_corner objects to define the route? By
recollection (at least in HL), you could target an entity whenever your
'train' hit that path_corner location.
Perhaps there's some way that you use this and target the doors... have
one on either side of each door to toggle the door. I can still
see issues keeping things synchronized... like if a player drove the
train upto the path_corner (toggling the door open), then backed away
(leaving the door open). If they reversed direction again, seems
like it'd toggle the door closed.
Perhaps using a couple on either side... the inner two would OPEN the door, the outer two would CLOSE the door.
Of couse, all this is moot if they no longer have the target field or you're not using the same entity.