PDA

View Full Version : The closer you come, the more open the door is.



ZixXer
03-01-2009, 07:21 AM
Hey

Can some one tell me how to make a door open more if a player is closer to the door?

so standing in the door way... the door is compleatly open. and standing 5 feed from the door it is half way open... and at 10 feed it is closed.

but i dont want to use like 20 trigers to make this effect. because i need to do it for alot of movers, so is there a way to do it with one?

Staward
03-01-2009, 11:04 AM
As far as i know, there's no way to calculate a gradual approach inside a trigger's radius, also there's no kismet action to do so....I think the only way would be placing several concentric triggers with gradually smaller radius, triggering the door animation...
I can see this method would be a pain in the arse....
There's also the problem some poeple have been complaining about, the touch triggers doesn't work well with bots, so using them to make doors would be only viable with a singleplayer map.

spermplant
03-01-2009, 12:31 PM
You can create a gated loop with a single touch volume and a path node. You can use a Touch event, a Gate action, a Get Distance action and a Delay action. Combine those to create a loop which will get the player's distance. Add a Float comparison for your movers, etc.

ZixXer
03-03-2009, 03:18 PM
You can create a gated loop with a single touch volume and a path node. You can use a Touch event, a Gate action, a Get Distance action and a Delay action. Combine those to create a loop which will get the player's distance. Add a Float comparison for your movers, etc.

thats for bots right and not for making the door open with distance

spermplant
03-05-2009, 04:21 AM
No.
The get distance should work for players and bots. I tested it here by setting up a pathnode inside an outer perimeter trigger volume and using a log to output the float variable of the get distance. I then walked my pawn to and from this pathnode and watched the log output fall and rise while in the volume. You should be able to set different positions of the door based on a float comparison using this variable.

Vectorspace
03-05-2009, 03:49 PM
But what would happen with multiple pawns walking through the node?

spermplant
03-05-2009, 07:01 PM
Yeah...single player proof of function is easy :) You would need to add more to your kismet structure for multi-player in order to ignore the farther player(s) and or sum the players' affects on the mover (depending on your desired operation.) Otherwise, you may get many different float values being sent to your matinee (or other method of control) which could result in your interp actor(s) jumping around to different positions or possibly crashing your game.

Angel_Mapper
03-05-2009, 07:24 PM
If you can't figure it out by this weekend shoot me a pm Saturday and I'll whip up some custom code for you. But you'll owe me like... a cookie or something.

spermplant
03-05-2009, 07:47 PM
Here is something I roughed out last night - if you would like to play with it:
http://files.filefront.com/DM+distancemover7z/;13416748;/fileinfo.html
'just a basic room to show how you can get the distance from something like a node to the instigator of an event and change a mover's position (shakily, I might add); It is not really usable as-is.