is making an rts in alice 2 possible?
im kind of new to the whole programming thing, but alice has been fairly simple so far. i've been pondering, however, how i would go about making an rts style game in alice (like starcraft, c&c). i attempted to make one, but ran into a really confusing issue.
there doesn't seem to be a way for alice to store the mouse's location on the fly, unless im just looking at this incorrectly. i can get alice to track the mouses location (i used this to create an edge panning sort of deal), but im lost as to how i could store it when i want to, say, move a unit to the location of where i clicked. is there any way to do this? it's absolutely essential for an rts in this style, and without it things crumble and fall over. also is it possible for alice to use right mouse in the events pane for controls? it only seems to use left mouse. |
My only suggestion on how to do this is use a grid of invisible squares and store the square clicked on.
I did this before on a RPG, but i got that annoying error when loading and i gave up. For the squares arty made an object pack and there is a 25/25 grid in there. Hope this helps and if you have any questions please ask. |
that's really disappointing that i have to do that :(
there has to be some way to get alice to do this, because it clearly has no issue keeping track of the mouses location. |
Could be Simple
1) In the events pane, you can add a "when mouse is clicked on something" event. It will say "do nothing"
2) Create a new method, and add an object parameter. 3) Go back to the event, and replace "do nothing" with the name of your method and then add "What was clicked" as the parameter. 4) You now have a method that can be programmed to do whatever you want anytime an object is clicked by Using customized lists and arrays. Happy Programming;) |
[QUOTE=oll;55912]that's really disappointing that i have to do that :(
there has to be some way to get alice to do this, because it clearly has no issue keeping track of the mouses location.[/QUOTE] What do you mean track of the mouses location? |
there was a function that kept track of the cursors distance from the top and left edge (i think, i don't have alice on me currently), and having it constantly print out the function resulted in something similar to (x,y) coords
|
That could be possible, use the x,y cords then move the objects to those cords.
Good idea, and i think it is possible, ill see if i can make that. |
I don't want to sound like Mr. Negativity, but making an RTS sounds almost impossible. It's taking me a long time to make a simple, bare-bones sports game. I couldn't fathom creating something like Starcraft.
But hey, if you are able to, then I'll eat my words :) |
2 Attachment(s)
Ok, i fooled around with this for a few mins, and heres what i came up with,
and it worked for me so far. It might need some tweaking depending on the height of the camera. EDIT: added a better working version, much more accurate |
[QUOTE=fourbros;55926]I don't want to sound like Mr. Negativity, but making an RTS sounds almost impossible. It's taking me a long time to make a simple, bare-bones sports game. I couldn't fathom creating something like Starcraft.
But hey, if you are able to, then I'll eat my words :)[/QUOTE] I find sports games the hardest... i guess everyone has whats hard for them. |
All times are GMT -5. The time now is 08:10 PM. |
Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.