Alice Community Can Alice remember past actions?

 Can Alice remember past actions?
 cjworld Junior Member   Status: Offline Posts: 8 Join Date: Dec 2011 Can Alice remember past actions? - 12-15-2011, 10:55 AM I remember my professor saying that Alice could remember past actions [for example, in my game, the player is supposed to win after they have gone to three different places (being within the threshold of the objects)]. How can I make it so that the win message won't appear if you go to the third place without having been to the first two places?
dakota95
Senior Member

Status: Offline
Posts: 426
Join Date: Aug 2011
Location: like I would tell you. ;)
12-15-2011, 11:04 AM

Quote:
 Originally Posted by cjworld I remember my professor saying that Alice could remember past actions [for example, in my game, the player is supposed to win after they have gone to three different places (being within the threshold of the objects)]. How can I make it so that the win message won't appear if you go to the third place without having been to the first two places?
you could try placing 3 if else statements inside of each other. I'm not sure now it would work but its worth a try. I've gotten 2 if/else statements working while inside of each other but 3 might be a little slow. Never know till you try

<Insert_Signature_Here>

 Past part
 cjworld Junior Member   Status: Offline Posts: 8 Join Date: Dec 2011 Past part - 12-15-2011, 11:30 AM Okay, but if you do that, won't Alice think it will only give the winning speech if you are at all three places at once? And if so, would putting a "Do in order" in there fix that?
dakota95
Senior Member

Status: Offline
Posts: 426
Join Date: Aug 2011
Location: like I would tell you. ;)
12-15-2011, 11:40 AM

Quote:
 Originally Posted by cjworld Okay, but if you do that, won't Alice think it will only give the winning speech if you are at all three places at once? And if so, would putting a "Do in order" in there fix that?
hmmm. Didn't think of that. Well it is probably a simple logic problem, and I am terrible at logic.

<Insert_Signature_Here>

 dakota95 Senior Member     Status: Offline Posts: 426 Join Date: Aug 2011 Location: like I would tell you. ;) 12-15-2011, 11:50 AM I came up with a solution, here is what you do: At the first place put an object on the ground really close to the check point. Then make the objects "is showing" false. Then make a method called "pick up object 1" place an if/else statement in the method. Then put the if/else statement inside of an infinite loop. Say "if camera is within "5 meters" of "the invisible object" then "the invisible object" move to camera, and set vehicle to camera. Do this for each of the three checkpoints. Then say if "object 1" is within "5 meters" of "object 2" (then make another if/else statement inside of that one) say if "object 2" is within "5 meters" of "object 3". Then make another if else statement inside of the second one, and say if "object 3" is within "5 meters" of object "object 1" then "give prize" I know this may be difficult to understand. If you have any questions about it feel free to ask
 Where creating method?
cjworld
Junior Member

Status: Offline
Posts: 8
Join Date: Dec 2011
Where creating method? - 12-15-2011, 08:15 PM

Quote:
 Originally Posted by dakota95 Then make a method called "pick up object 1" place an if/else statement in the method.
What object am I creating the method under?

 GameKid Senior Member     Status: Offline Posts: 467 Join Date: May 2011 Location: My magnificent castle 12-15-2011, 10:15 PM No, no, no. What you need to do is create three booleans. There's a button that says "New variable" under world's properties. Those can be used in if/else statements in the event list. [COLOR=e4eaf2]Your text here[/COLOR] Come on, you know you want to try it.
dakota95
Senior Member

Status: Offline
Posts: 426
Join Date: Aug 2011
Location: like I would tell you. ;)
12-16-2011, 11:16 AM

Quote:
 Originally Posted by cjworld What object am I creating the method under?
you can create the method under world. Just have any object (doesn't really matter what) as long as it moves to you and with you it will work.

@gamekid

guess that would work. I'm just terrible at using 'em

<Insert_Signature_Here>

 GameKid Senior Member     Status: Offline Posts: 467 Join Date: May 2011 Location: My magnificent castle 12-17-2011, 12:50 AM Eh, you don't suck, it's just that you can't use them in methods. [COLOR=e4eaf2]Your text here[/COLOR] Come on, you know you want to try it.
 dakota95 Senior Member     Status: Offline Posts: 426 Join Date: Aug 2011 Location: like I would tell you. ;) 12-17-2011, 07:53 PM I did basically the same thing in my knight design game.

 Tags function, functions, victory, victory conditions

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge