Help with a trigger
I have this fountain in my map that heals players when they drink from it (use it). It works well, but some people spam it and are invincible and there is always fighting at the fountain. So I wanted to add an delay:
But now the Re-Trigger Delay is global, this means only one player can use the fountain every 10 seconds. What I want is that guy A uses the trigger and has to wait 10 seconds before he can do so again, but in the meantime guy B can use it. The trigger should be local, but the effects (sound, healing) global.
No kismet professionals here? :(
Pebble the Pacifist last edited by
I think that the Delay kismet action/event or whatever it is has a target node. Maybe attach an object variable to said node? I hope that helps, I don’t delve into kismet that often… :mask:
Nope, it doesn’t have one unfortunately :(
I managed to build something that saves the object and when pressed checks if it’s the same object before modifying health. It felt like a crappy workaround and only limits a player to use it multiple times in a row, as soon as anyone else uses it he is free to use it again. So two trolls could still abuse it while smashing on each other or other players while effectively being invincible.
It is a bit tricky to do this in Kismet, and would usually be something better suited to a custom actor (code heavy.)
Not saying it is not possible, but what you want are object lists.
It would add a player who just used it to an object list, then run checks on that player to see if they are or are not in that list every time it is used. You would have a delay somewhere to removed them from the list, then allowing them to use it again.
for relevant actions, control + F: object list
I will double check at the office right now, as I am just typing off memory from my laptop.
Thanks a lot, I will read into that later and report back!
Ok I tried it with this, didn’t work correctly in multiplayer :(
Removed the dumb endless loop at the end (Add to list - Out - Start - Finished - Remove from list - Out - Start - Finished…).
But still it works fine in editor testing, but when two guys try to use the fountain everything is messed up. Either you can use it again after 2 secs or sometimes not at all or after like 30 seconds. I’m not really sure about the locality of all this but I suppose if another player uses the toggle, the Remove From List action removes this last player, and not the one that really is in the list for 10 seconds.
This is the current state:
Came up with a “good enough” solution:
If not in list heal and put in list.
If in list error sound and don’t heal.
Empty list every 10 seconds.
This gives a delay between 0 and 10 seconds before the player can drink again, good enough to stop trolling.