Alice Community  

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

Reply
 
Thread Tools Display Modes
how do i get an object to...
Old
shaydon
Senior Member
 
Status: Offline
Posts: 445
Join Date: Dec 2009
Location: Caspian Border
Default how do i get an object to... - 01-06-2010, 09:16 PM

how do i get an object to go back to its orginal position
(e.g object starts off in middle of screen and when i press and hold button it sways from side to side) thats what i want it to do but how do get to go back to the middle of the screen
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 01-06-2010, 09:31 PM

You can have a While button is being held event, and then during you would have the swaying method. And then underneath during there is like ending or something. Just put a method in there to set the object to its original position. Maybe you can make a method like move to and then objects position on the map. Aww what i'm saying is too confusing, just look at the example I made.

Copy it exactly into your program, for instance you need a pointofview variable and the method that sets it in beginning of program.
Attached Files
File Type: a2w PositionTest.a2w (438.2 KB, 14 views)


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-07-2010, 07:23 PM

OR you can just put a dummy object on teh starting point, then tell i to go thre when done...tis what i use


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 01-07-2010, 07:31 PM

yes I guess that would be a lot easier. But you would also have to have a pose for the guy just if he moves any parts of his body when he moves, so that he goes back to normal. If he does not, then you can just set him to the point of view of the dummy object.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-07-2010, 07:38 PM

Well ok


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 01-07-2010, 07:40 PM

No i don't mean that you did anything wrong, your idea is a lot better than mine is. You would have to put a pose for the way I did it too. I just didn't think of that way.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-11-2010, 08:49 AM

Poses dont work for me. it always twists like crazy when i use them


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 01-11-2010, 09:14 AM

Poses only work properly if you want the action to happen over the shortest path. For example, having a knight raise his sword and then swing it downward would require two poses (sword raised and sword down), not one, because a pose-setting motion moves from the object's current pose to the pose specified along a straight line.

Also, some models do have some weird issue where poses cause weird things to happen. I know that the ninja and magician are 2 such models (go ahead and try the ninja if you haven't already, it's pretty funny, just be sure to do it in a new world in case of corruption).


(')>
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-11-2010, 09:19 AM

oh! a straight line...ok thanks now i know


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.