I'm in need of dire help. A board game I am trying to make is in great danger because of the way I am currently making it. There are a whole mess of variables for what unit you are making, what unit you have selected, what action you are taking, all the nasty things of that sort. There are no set Player 1 and Player 2, and because of that, the attacking, moving, not even ending your turn works. So, I am asking of your help! How would you fabricate the game? I've thought of this:
- Mobs for Player 1 and Player 2
- Use something different to build units and selected unit instead of variables
- I still have no idea on how to make the units attack and the like except for making procs at their sub-level (/mob/Units/UnitHere) and acessing them when their owner click attack. But that would bring us back to having to use variables for the selected unit. So, any ideas for me? Thank you in advance!
ID:152728
![]() Dec 10 2005, 4:03 am
|
|
Lotho wrote:
I'm in need of dire help. A board game I am trying to make is in great danger because of the way I am currently making it. There are a whole mess of variables for what unit you are making, what unit you have selected, what action you are taking, all the nasty things of that sort. Let's see some of that mess. I'm sure there are ways to streamline it. There are no set Player 1 and Player 2, and because of that, the attacking, moving, not even ending your turn works. Au contraire, you should not have set vars like player1 and player2. It is not flexible, it is not extensible, and it usually leads to repeating the same code. So, I am asking of your help! How would you fabricate the game? I've thought of this: Not a good idea. - Use something different to build units and selected unit instead of variables It sounds like you just need better organization for the vars you have. - I still have no idea on how to make the units attack and the like except for making procs at their sub-level (/mob/Units/UnitHere) and acessing them when their owner click attack. But that would bring us back to having to use variables for the selected unit. Well, you should have a var indicating the selected unit. Or better yet, a list, if you want to be able to do multiple selection. Lummox JR |
then in your making proc
this is assuming your doing this:
ect
oh and for player 1 and 2