Alice Community alice poses

 alice poses
 thibauld Guest   Status: Posts: n/a alice poses - 02-11-2010, 04:52 AM hey, im making a game where i throw a couple of dice and they land on a random side.Im trying to make alice recognize what iv have trown, and i tried useing poses, but everytime i do something with poses and start the game or save it, alice crashes and my save is lost, losing a lot of work everytime. im tring to do it with 1 dice first, so i set dice1 to how it is standing --> dice1 set pose dice1.pose1. then i use if statements to determine what ive trown by comparing this pose to other poses i made earlier of the dice of all sides, but it keeps crashing everytime i play it after that. what am i doing wrong?
 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. 02-11-2010, 09:23 AM You may be triggering a world-stopping error. Could you post your world so I can take a look at it? (')>
 jediaction Senior Member     Status: Offline Posts: 5,064 Join Date: Jul 2009 Location: Bel Air, Maryland 02-11-2010, 09:28 AM I would do a random number variable. Lke 1-6, then put 6 dummys inthe eaxct same place. Then make each one of those 6 chances and make the die stand up on that one side. Website: www.salokingames.com FaceBook: www.facebook.com/SalokinGames
 jediaction Senior Member     Status: Offline Posts: 5,064 Join Date: Jul 2009 Location: Bel Air, Maryland 02-11-2010, 09:28 AM did it help Website: www.salokingames.com FaceBook: www.facebook.com/SalokinGames
 my game
thibauld
Guest

Status:
Posts: n/a
my game - 02-12-2010, 04:36 AM

Hey all,

here is my game so far. there is a lot of text in dutch though, but that isnt really important for the game. The '# points' world method is where I tried using the poses. You can skip the opening with enter. im aware that i used MUCH more code than needed :P

if you press k now after the intro you will get an 'error during simulation' error.
Attached Files
 tienduizenden_v4c.a2w (1.02 MB, 7 views)

Last edited by thibauld; 02-12-2010 at 04:53 AM.

thibauld
Guest

Status:
Posts: n/a
02-12-2010, 04:38 AM

Quote:
 Originally Posted by jediaction did it help
hmm, you method would require much less code and work, but i already got what i have now and im too proud to delete that xD

Last edited by thibauld; 02-13-2010 at 11:54 AM.

 poses
thibauld
Guest

Status:
Posts: n/a
poses - 02-15-2010, 05:48 AM

Also, could someone please explain a bit about poses in Alice, since I am trying to understand them but things still wont work...

Also, I watched a couple of other treads and thought it might be usefull if i posted the error i get here. please help me:

Error during simulation.

Alice version: 2.2 6/10/2009

Throwable that caused the error:
java.lang.NullPointerException
at edu.cmu.cs.stage3.alice.core.response.PoseAnimatio n\$RuntimePoseAnimation.prologue(PoseAnimation.java :68)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder\$Ru ntimeDoInOrder.childPrologueIfNecessary(DoInOrder. java:52)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder\$Ru ntimeDoInOrder.update(DoInOrder.java:97)
at edu.cmu.cs.stage3.alice.core.response.CallToUserDe finedResponse\$RuntimeCallToUserDefinedResponse.upd ate(CallToUserDefinedResponse.java:86)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder\$Ru ntimeDoInOrder.childUpdate(DoInOrder.java:57)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder\$Ru ntimeDoInOrder.update(DoInOrder.java:98)
at edu.cmu.cs.stage3.alice.core.behavior.TriggerBehav ior.internalSchedule(TriggerBehavior.java:69)
at edu.cmu.cs.stage3.alice.core.Behavior.schedule(Beh avior.java:226)
at edu.cmu.cs.stage3.alice.core.Sandbox.scheduleBehav iors(Sandbox.java:70)
at edu.cmu.cs.stage3.alice.core.World.scheduleBehavio rs(World.java:444)
at edu.cmu.cs.stage3.alice.core.World.schedule(World. java:486)
at edu.cmu.cs.stage3.alice.core.clock.DefaultClock.sc hedule(DefaultClock.java:99)
at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l\$7.run(AuthoringTool.java:702)
at edu.cmu.cs.stage3.alice.authoringtool.util.Default Scheduler.simulateOnce(DefaultScheduler.java:115)
at edu.cmu.cs.stage3.alice.authoringtool.util.Default Scheduler.run(DefaultScheduler.java:76)
at edu.cmu.cs.stage3.scheduler.AbstractScheduler.run( AbstractScheduler.java:45)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.Dialog\$1.run(Unknown Source)
at java.awt.Dialog\$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at edu.cmu.cs.stage3.swing.DialogManager.showModalDia log(DialogManager.java:60)
at edu.cmu.cs.stage3.swing.DialogManager.showDialog(D ialogManager.java:128)
at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.play(AuthoringTool.java:5159)
at edu.cmu.cs.stage3.alice.authoringtool.Actions\$15.a ctionPerformed(Actions.java:168)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
at javax.swing.AbstractButton\$Handler.actionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
Attached Files
 tienduizenden_v4c.a2w (1.11 MB, 3 views)

Last edited by thibauld; 02-15-2010 at 05:56 AM.

 thibauld Guest   Status: Posts: n/a 02-17-2010, 03:57 PM ehm could someone pls help me? x2495iiii asked for the game but hasnt said anything since
jediaction
Senior Member

Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
02-17-2010, 04:08 PM

Quote:
 Originally Posted by thibauld hmm, you method would require much less code and work, but i already got what i have now and im too proud to delete that xD

Alright then

Website: www.salokingames.com

 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. 02-17-2010, 04:24 PM K, well, here's my input. You can't use poses to make the dice objects set themselves so that a certain side is facing upwards. Poses deal with the placement and orientation of subparts, not the object itself. I'd recommend using something other than poses, like dummy objects or the dice's orientation in the world, to develop a series of if/else if statements which check each dice to determine which side is facing the camera. (')>

 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