View Full Version : [Event] about the KEY
someonehoi
03-03-2006, 05:32 PM
Is it possible use a same Keys to call different "method"?
Example.
If Event=EventA,
While A is pressed, do "A method"
If Event=EventB,
While A is press , do "B method"
i cannot find if/else statement in the event.
pausch
03-04-2006, 07:57 AM
I'm not sure I completely understand your question, but I think the solution may be to have the event call a method you create, and then in that method do whatever if/then/else that you need to do.
If that doesn't help, can you please try rephrasing your question, and I'll see if I can figure out how to help?
someonehoi
03-04-2006, 09:44 PM
I'm not sure I completely understand your question, but I think the solution may be to have the event call a method you create, and then in that method do whatever if/then/else that you need to do.
If that doesn't help, can you please try rephrasing your question, and I'll see if I can figure out how to help?
Thanks for advice.I have some ideas now.
One more example.
When you playing first person shooting game,eg Battle Field,
you are a soldier,
The keyboard [up,right,left,down] function as
soldier:walk forward,move right, move left, walk backward respectively.
While the soldier is riding on a vehicle,
such as tank,helicoptor,boat,
the keyboard [up,right,left,down] functions are changed:
Tank: move forward,turn right,turn left,move backward
Helicoptor: turn forward,roll right,roll left,turn backward
Boat: move forward,turn right,turn left,move backward
In the example above,the player use the same keys set [up,right,left,down] to do different things while some events happened.
In the Alice,now i can only use one key set.
I am thinking a way to create more than one key set.
pausch
03-05-2006, 11:31 PM
So I think the easiest way to deal with this is to set a global variable for which mode the player is in, and then in every event handling method, you'll check that global variable and do the correct thing, depending on the mode.
someonehoi
03-07-2006, 12:17 PM
HI,i can use same key multi functions now.
But there is a little trouble in the Event windows.
i have too many events [keys],they are too long.
Every time i create a new event, it jump to the bottom.
I have to roll event's window down,down and down..i feel very hard to use.
is any method that i can group the events together?
pausch
03-08-2006, 10:13 PM
Unfortunately, there is no easy way to do that ; when we designed the system, we did not place a high emphasis on users who might have extremely long lists of events, since that is a very unusual thing. We apologize for the inconvenience.