Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
[Event] about the KEY
Old
someonehoi
Guest
 
Status:
Posts: n/a
Default [Event] about the KEY - 03-03-2006, 04: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.
   
Reply With Quote
Old
pausch
Director of the Alice Project
 
Status: Offline
Posts: 38
Join Date: Jul 2005
Default 03-04-2006, 06: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?


Randy Pausch
Director of the Alice Project
   
Reply With Quote
Old
someonehoi
Guest
 
Status:
Posts: n/a
Default 03-04-2006, 08:44 PM

Quote:
Originally Posted by pausch
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.
   
Reply With Quote
Old
pausch
Director of the Alice Project
 
Status: Offline
Posts: 38
Join Date: Jul 2005
Default 03-05-2006, 10: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.


Randy Pausch
Director of the Alice Project
   
Reply With Quote
Old
someonehoi
Guest
 
Status:
Posts: n/a
Default 03-07-2006, 11:17 AM

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?
   
Reply With Quote
Old
pausch
Director of the Alice Project
 
Status: Offline
Posts: 38
Join Date: Jul 2005
Default 03-08-2006, 09: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.


Randy Pausch
Director of the Alice Project
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.