RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Lever DoubleClick Delay...

Sorthious

Squire
I hope this is the right section for this post...if not, my appologies in advance.

I'm making a lever puzzle using 3 SimpleLevers and have them set up so that each position changes the hue of the lever operated and certain positions move one of the other 2 levers.

My problem is that if you doubleclick really fast it skips over the check of the LeverState and avoids moving one of the other Levers. This would make it too easy to clear the puzzle.

I've set the Min/Max Delay in Spawner props to 0 but it still allows you to quickly skip over a lever position before TriggerObjectProp notices the LeverState.

So, is there any way to implement a delay for the Lever so that it can only be DoubleClicked once every second without having to script it. Thanks in Advance!
 

Mortis

Knight
Script support would have been the best place to post this.
You can add a delay.
Put the code below in your OnDoubleClick method. Then put your code from OnDoubleClick where I put "your code here". Make sure to remove "your code here".

Code:
                    Timer.DelayCall( TimeSpan.FromSeconds( 2.0 ), new TimerCallback( delegate
                    {
  your code here
            } ) );
 

Sorthious

Squire
Thanks for the response. I put the post here because I was asking if there was a way to implement the delay 'without' having to script it. Didn't want to change the delay for all SimpleSwitches, just the ones I'm using for this puzzle. It's just that players currently can currently repeatedly change the LeverState and the XMLSpawner doesn't catch the new lever position fast enough. I guess if I have to I can just make the delay 1sec. That should be enough for the spawner to catch up....Thanks again for the help
 
Top