Limiting Mouse Actions
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Limiting Mouse Actions
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.
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
Use the wall_action that genertes a menu option for pushing the button?
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Re: Limiting Mouse Actions
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.
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Limiting Mouse Actions
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...
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...
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Re: Limiting Mouse Actions
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
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)
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)
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Limiting Mouse Actions
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!
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!
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Re: Limiting Mouse Actions
This must be the case.beowuuf wrote:(the functionality may have been broken once multiple wall items were allowed at once)
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.
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: Limiting Mouse Actions
My switches tutorial might help give you some ideas...
1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Re: Limiting Mouse Actions
Which tutorial is this?Lord_BoNes wrote:My switches tutorial might help give you some ideas...
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.
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: Limiting Mouse Actions
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.
I'm updating my tutorial list now, and adding my switches tutorial.
1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Re: Limiting Mouse Actions
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.
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.
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: Limiting Mouse Actions
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).
1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Re: Limiting Mouse Actions
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?
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?
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Limiting Mouse Actions
You don't need to worry about warnings: if the dungeon compiles and plays as you expect, it's fine.
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: Limiting Mouse Actions
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.
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.
1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Re: Limiting Mouse Actions
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.
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.
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: Limiting Mouse Actions
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?
1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Re: Limiting Mouse Actions
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.This might work as well with the alcove with teleporter.
It's okay, I can put up with the warnings. Thanks
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: Limiting Mouse Actions
@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
@Chaos-Shaman: It does make you feel like you dungeon is broken, doesn't it? It really is a pet hate of mine
1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
- Chaos-Shaman
- High Lord
- Posts: 2642
- Joined: Wed May 03, 2006 7:26 pm
- Location: The Gates of Hell
Re: Limiting Mouse Actions
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.Soaponarope wrote: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.This might work as well with the alcove with teleporter.
It's okay, I can put up with the warnings. Thanks
keep your gor coin handy
- Soaponarope
- Artisan
- Posts: 190
- Joined: Wed Sep 16, 2009 4:18 pm
Re: Limiting Mouse Actions
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 youChaos-Shaman wrote: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.Soaponarope wrote: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.This might work as well with the alcove with teleporter.
It's okay, I can put up with the warnings. Thanks
- Lord_BoNes
- Jack of all trades
- Posts: 1064
- Joined: Mon Dec 01, 2008 12:36 pm
- Location: Ararat, Australia.
Re: Limiting Mouse Actions
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.
1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin
Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
- Chaos-Shaman
- High Lord
- Posts: 2642
- Joined: Wed May 03, 2006 7:26 pm
- Location: The Gates of Hell
Re: Limiting Mouse Actions
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.
keep your gor coin handy
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Limiting Mouse Actions
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!
You kids these days have it so easy!