Thread: RTS Movement
View Single Post
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
Default 04-27-2015, 05:17 PM

Quote:
Originally Posted by MrMoke View Post
OK ROC- That's OK, but---

I challenge you to make the following changes to you logic, so that the Play window can be modified to any full-pane sizes, and still work accurately.

1) Use the Rendering preferences to modify the play width and height to a different standard size.

2) Modify the code to prompt your user to click somewhere that will allow you to compute the value of any variables that you may need. Use any fixed variables that you may need only in this portion of your code.

3) Use those newly created variables along with the distance from top/left to control the ball movement.

Only took me a few minutes after I got my head wrapped around it.
Im confused... Isnt this what im doing?

1. I set the render size.

2. I do this in the first part of the moveTo method.

3. I do this in the seconds part of the moveTo method...


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote