Page 1 of 1
Limiting Mouse Actions
Posted: Sat Oct 30, 2010 9:40 pm
by Soaponarope
I am looking for a good method to limit how often the user is able to make certain mouse actions(example-pushing a button). Sure you can set delays, but since the player can keep pressing it over and over very quickly, these actions all happen just as quickly after the delay.
I currently have a (sort of)workaround involving floor triggers, though it is less than ideal, and I was just wondering if anyone tried anything similar and had suggestions.
Re: Limiting Mouse Actions
Posted: Sat Oct 30, 2010 10:54 pm
by beowuuf
Use the wall_action that genertes a menu option for pushing the button?
Re: Limiting Mouse Actions
Posted: Sun Oct 31, 2010 12:06 am
by Soaponarope
Ah, and then have cooldowns on the "push button" attack method. That could work, though it seems it would be a bit strange. I will try it out, thank you.
Re: Limiting Mouse Actions
Posted: Sun Oct 31, 2010 12:29 am
by Sophia
There isn't really any way of doing this that isn't slightly crazy, due to the way that RTC has its mechanics set up.
The best I can come up with is that when you push the button, it also triggers a relay that makes the button disappear, and after a time delay another relay later makes the button reappear. You could have an inactive "pushed in" version of the button underneath so it looks like it just goes in and pops out when it's ready to push again.
I haven't tested this and I'm not going to, but it's a thought...
Re: Limiting Mouse Actions
Posted: Sun Oct 31, 2010 12:38 am
by Soaponarope
I also had that thought, unfortunately it can't be done due to the wackiness of RTC's (activate/deactivate vs visible/invisible) mechanics when dealing with switches.
Re: Limiting Mouse Actions
Posted: Sun Oct 31, 2010 7:03 am
by beowuuf
It was very easy to do that in the old DM engine, if you could access the hex states, because there was an unused version of the pushbutton that would only activate if it was the 'visible' option, so you could cycle them as Sophia described.
And you can't make the pushbutton invisible, but you could make a covering wall section toggle visibility to hide the button, couldn't you? (You used to be able to, the functionality may have been broken once multiple wall items were allowed at once)
Re: Limiting Mouse Actions
Posted: Sun Oct 31, 2010 11:34 am
by Gambit37
i haven't tried this for years, but if you include a disabled switch graphic on the bottom of your stack then can't you simply disable your button to hide it, revealing the fake switch at the bottom? Note this only works if your fake lowest switch is non triggering (clone a static image and replace it's graphics with a button image)You then make your triggering switch reappear after a delay using a relay.
EDIT: I was looking at this on my mobile phone and missed half the earlier responses, so I don't think I added anything useful to what was already discussed, sorry!
Re: Limiting Mouse Actions
Posted: Wed Nov 03, 2010 11:51 pm
by Soaponarope
beowuuf wrote:(the functionality may have been broken once multiple wall items were allowed at once)
This must be the case.
You can hide it yes, but all you have to do is click the spot where it was and it will still work.
There is no good way to disable switches, which is why I went the way of using floor triggers as a workaround, since those can be properly enabled and disabled. Your right Sophia, there is no way that isn't kinda weird, and I think my original workaround is as good as it is going to get. Thank you all for your suggestions.
Re: Limiting Mouse Actions
Posted: Thu Mar 10, 2011 10:35 am
by Lord_BoNes
My
switches tutorial might help give you some ideas...
Re: Limiting Mouse Actions
Posted: Fri Mar 11, 2011 10:42 pm
by Soaponarope
Lord_BoNes wrote:My
switches tutorial might help give you some ideas...
Which tutorial is this?
I hadn't looked through these, because they all seemed to sound like things I've done before. I just opened a couple that I thought might be the one you were referring too, and they were unrelated. These are nice tutorials for learning RTC though.
Re: Limiting Mouse Actions
Posted: Fri Mar 18, 2011 12:58 am
by Lord_BoNes
I'm sorry, I thought I'd uploaded that tutorial ages ago... my bad
I'm updating my tutorial list now, and adding my switches tutorial.
Re: Limiting Mouse Actions
Posted: Fri Mar 18, 2011 1:54 am
by Soaponarope
This was interesting to look at, and see how others figure out alternative ways to do things. I did these things in quite different ways, though getting the same results.
For instance, my zo doors are done by having the trigger underneath the door operated by the spell's cloud over the trigger, and directly toggle the door. No button or action needed.
Re: Limiting Mouse Actions
Posted: Fri Mar 18, 2011 6:08 am
by Lord_BoNes
A "NULL" image doorbutton does the exact same thing (no trigger needed). The only reason I have that trigger on the door, is so that it only activates once (the trigger destroys the doorbutton).
Re: Limiting Mouse Actions
Posted: Sat Mar 19, 2011 1:20 am
by Soaponarope
Ah I see, just various ways of doing things.
Your way for the first example is more polished than mine, I found that helpful.
For the second, the trigger and movable wall both aren't needed as the alcove can be the trigger itself.
I haven't figured out how to put a teleporter in an alcove without warning though. As such, I can't keep my dungeon warning free despite by best efforts. Any luck with this?
Re: Limiting Mouse Actions
Posted: Sat Mar 19, 2011 1:33 am
by Gambit37
You don't need to worry about warnings: if the dungeon compiles and plays as you expect, it's fine.
Re: Limiting Mouse Actions
Posted: Sat Mar 19, 2011 4:23 am
by Lord_BoNes
You may not need to worry about them, but I see where you're coming from soap... I also try to completely get rid of all errors.
The only one I worry about is a "teleporter targeting a wall", you can only really get around this one by using actions.
You can try to get around it by cloning an object and using MOVE_ITEM_TO_OBJECT and targeting this new clone as your object_1 (the triggering item will teleport to the 1st instance of the given object).
Or if your given alcove is a unique object (it's only in there once) then just use MOVE_ITEM_TO_OBJECT targeting your alcove.
Or you can try using the MOVE_ITEM_NORTH/E/S/W or ROTATE_ITEM_NORTH/E/S/W to get your item back into an alcove. Remember that MOVE_ITEM can leave the tile it's on, ROTATE_ITEM can't.
Re: Limiting Mouse Actions
Posted: Sat Mar 19, 2011 4:50 am
by Soaponarope
Yea, I know warnings don't cause problems, just a pet peeve of mine when I open the editor up.
I got around "teleporter targeting a wall" by making all such walls movable, and having them start off in the invisible state. Then they toggle at the start of the game or certain must pass zones, to become active again.
The teleporter in the alcove works just how I want it, it just doesn't like me doing that. It's not teleporting object's into alcoves that is an issue, but out of them. I could do various things with specific objects, but I want the alcove to teleport any object placed in it to somewhere else. The distance is far enough that using move item (direction) is a pain, and move_item_to_object won't work in this situation due to how it's set up. I did use these actions to good effect in others areas though. Thanks for the input.
Re: Limiting Mouse Actions
Posted: Sat Mar 19, 2011 5:25 am
by Lord_BoNes
Yeah, I've also used the "start invisible & activate at startup" kind of walls. It's actually pretty damn interesting what you can squeeze out of RTC, isn't it?
Re: Limiting Mouse Actions
Posted: Sat Mar 19, 2011 5:30 pm
by Soaponarope
This might work as well with the alcove with teleporter.
If you use the invisible state fake wall trick in that case, it will get a warning that the alcove isn't on a wall though.
It's okay, I can put up with the warnings. Thanks
Re: Limiting Mouse Actions
Posted: Sat Mar 19, 2011 5:53 pm
by Lord_BoNes
@Soaponarope: Couldn't you, for instance, use ROTATE_ITEM to get the item out of the alcove, and then use MOVE_ITEM to nudge it onto a nearby floor tile? Then you can use a teleporter there without ANY warnings.
@Chaos-Shaman: It does make you feel like you dungeon is broken, doesn't it? It really is a pet hate of mine

Re: Limiting Mouse Actions
Posted: Sun Mar 20, 2011 10:33 am
by Chaos-Shaman
Soaponarope wrote:This might work as well with the alcove with teleporter.
If you use the invisible state fake wall trick in that case, it will get a warning that the alcove isn't on a wall though.
It's okay, I can put up with the warnings. Thanks
It totally works soapy. I just did it, and teleported an object if placed in alcove. You need to put the alcove in a regular wall first. Then, on a tile, place a moveable wall then add your teleporter. It works, trust me on this soapy. No errors. Don't forget to cut and paste the alcove from the wall to the moveable wall with the teleporter.
Re: Limiting Mouse Actions
Posted: Sun Mar 20, 2011 2:51 pm
by Soaponarope
Chaos-Shaman wrote:Soaponarope wrote:This might work as well with the alcove with teleporter.
If you use the invisible state fake wall trick in that case, it will get a warning that the alcove isn't on a wall though.
It's okay, I can put up with the warnings. Thanks
It totally works soapy. I just did it, and teleported an object if placed in alcove. You need to put the alcove in a regular wall first. Then, on a tile, place a moveable wall then add your teleporter. It works, trust me on this soapy. No errors. Don't forget to cut and paste the alcove from the wall to the moveable wall with the teleporter.
That is so weird! I know I did this before, but must have done it in a different order or something. I just did it exactly like you said and now there is no warning message. Thank you

Re: Limiting Mouse Actions
Posted: Sun Mar 20, 2011 3:11 pm
by Lord_BoNes
Order of execution is definately what was the cause. I often find that trying to do things in a different order achieves completely different results.
Re: Limiting Mouse Actions
Posted: Sun Mar 20, 2011 4:25 pm
by Chaos-Shaman
Absolutely order is key, heh, coming from Chaos, heh. I screwed around with that for days, to see what I could and could not do. Checked so many ways to add objects. To add hundreds of trees was really not that hard to do. Once you have the fake wall and all the goodies in it, it was just a matter of cut and paste, Ctrl-V couple hundred times. I felt so much better that there was no errors.
Re: Limiting Mouse Actions
Posted: Sun Mar 20, 2011 7:59 pm
by Sophia
All this reminds me of a hack I put into Dark Portal ages ago. Back before RTC supported DM2-style pillars that were scaled like monsters or doors, i.e. one view that automatically gets scaled. Back then, there were only flooritems with their pre-scaled multiple views, which I didn't want. Monsters weren't editable enough that they could be hacked into pillars without oddball things happening, so that left me with doors. I noticed, by some lucky coincidence, that doors that were just spawned in the middle of nowhere were only visible N/S, but if you had an item in the right spot of the floor that expired into a door, the door was visible E/W. So, each "pillar" in DP is actually a door (N/S) and an instantly expiring item that creates another door (E/W), so it's visible from all sides and looks like a pillar.
You kids these days have it so easy!
