ID:178020
![]() Jun 28 2002, 5:42 pm (Edited on Jun 28 2002, 7:34 pm)
|
|
Ok, I'm creating a racing game. I want to make it so the user cannot use the left arrow key to move left, but can click the left arrow button that is on the dream seeker interface, the one that generally moves characters left. What's a good set of code that could do this for me?
|
![]() Jun 28 2002, 8:19 pm
|
|
I'm pretty sure that's impossible. The left arrow and that button are the same thing. You can't override one but not the other.
|
I see. Then is there a procedure that could lock both, and possibly force the usr to resort to a verb? Which, of course, leads to the question, "Is it possible to create a verb that moves a mob?" which I'm pretty sure there is.
|
I have found a procedure that will let me force a mob to take one step, called step(), therefore I can now make a game where the user just clicks as fast as they can in hopes of defeating their opponents who do the same thing. Now I just need to find a way to lock the right direction button, as that is always faster than clicking some verb called "move". Any tips?
|
You can macro the arrow keys to other verbs and the arrow buttons in the DS client will still call the default client directional procs.
|
I FIGURED OUT A WAY!
Make a .dms file, name it Macro and put this in it macro East return "L" West return "R" Then Make A .dm File and name is Macro too, and input this mob/verb/L() set hidden = 1 return 0 mob/verb/R() set hidden = 1 return 0 You can use other .dirs too. |
This is the kind of newbie we need. Sure, he asked for code, but that's because of inexperience, but at least he knew about what he was talking about, and was fairly precise. Anyone who wishes to make a fan game, try to be more like this (except for the code part).
On the other hand, try not to say very newbiesh (or whatever) question, because my first thought was "lame rip of DBZeta". Just some helpful advise so that you don't get flamed to much. By the way, the game sounds like it has good potential. |