Individual Mouse Button Detecton
1 Attachment(s)
Currently mouse click events in Alice are triggered no matter what mouse button is pressed. I have discovered how to detect which mouse button was pressed and whether a modifier key (like CTRL or ALT) was held down at the time.
This is all done in pure Alice code, no Jython. Play the attached world. Try clicking with each mouse button, it will print which one was used. There is also an event for clicking with CTRL, so try doing so and it will print "CTRL click" and whichever button was used. None of you will have the latest style mod that enables use of this in the editor, so as far as you will be able to see, the events will look normal at your end, as if they should all trigger when any mouse button is clicked. |
This is amazing. I wonder what kind of games this could be used for. Key combinations is an amazing achievement. Doing this with only Alice Code is amazing to. I still have yet to master a few things in Alice.
|
How is that even possible? If it was done in pure alice code, there was no hacks... And what you wrote in alice code would just be any mouse clicks! How did you do it?!
|
[QUOTE=jediaction;48839]This is amazing. I wonder what kind of games this could be used for. Key combinations is an amazing achievement. Doing this with only Alice Code is amazing to. I still have yet to master a few things in Alice.[/QUOTE]Think Minecraft or FPSs where the mouse aims and shoots.
[QUOTE=GameKid;48851]How is that even possible? If it was done in pure alice code, there was no hacks... And what you wrote in alice code would just be any mouse clicks! How did you do it?![/QUOTE]I didn't say no hacks, this very much utilises hacks, but these are just hacks that unlock this hidden feature, so the mouse events are pure Alice code. After applying the mod, anybody could program individual buttons. This is what it looks like at my end:[IMG]http://img440.imageshack.us/img440/8227/individualmousebuttonde.png[/IMG]You can set what button has to be pressed and/or what button should not be pressed for the event to trigger. |
WOW. That is incredible.:eek:
|
I'll try putting this in Hero's or something.
|
Can this be used to make numpad keys work?
|
All times are GMT -5. The time now is 07:46 PM. |
Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.