The Daily Click ::. Forums ::. Klik Coding Help ::. problems with turns
 

Post Reply  Post Oekaki 
 

Posted By Message

Vaynes



Registered
  27/01/2005
Points
  15
17th March, 2005 at 13:01:56 -

I've used the pathfinding object in MMF to make a point and click engine for a turn based strategy game, everything works fine the first time round but it all goes wrong the second, the third is even worse and just don't ask about the fourth.

i'm using various groups of actions, all of which are turned on and off when they should be. The events should, in theory, run in exactly the same order and the same way as the first turn, but this isn't happening.

Does anyone know of a way round this problem or have an example of looping groups of actions?

 
Ever bitten off more than you can chew?

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
17th March, 2005 at 13:57:41 -

pretty tough to answer unless you post an example file so we can see what you're doing. As you say, the event order WILL be the same second time round.

Are you certain you have reset all the values, flags, array items etc that you changed the first time round? That sounds like the most likely cause of problems to me.

Are you using nested loops (where an event in loop A starts loop B)? These are pretty tricky to get working, although I usually find it just crashes if i get it wrong.

Failing that (or a better idea from someone who knows more about it than me) try being really specific about what you need to be able to do, and i'll attempt to make an example if it's not too complicated.

I'm actually in the middle of writing an article all about making tile-based games (including pathfinding & movement), which will include a few examples and lots of diagrams. Not sure when It'll be done, but I've got about 2900 words so far and i have a lot to do still.

Image Edited by the Author.

 
n/a

Vaynes



Registered
  27/01/2005
Points
  15
17th March, 2005 at 15:34:55 -

I'll give you an outline of what I want to achieve with this game.

Player has a team of 3 characters, you always start your turn with the first character, have to hit a button to move to the next character.

Right click on the sprite to bring up a movement box, then left click within the movement box to move there. After you have moved you can attack the enemy if he is within range, either melee or ranged attacks. (using active's for the range)

then it's the enemys turn, very basic atm, if you are within a certain distance he will move towards you and attack, if not he does nothing. (still need to code ai properly)

The next thing I want it to be able to do is automatically return to the players control on the first character, or which ever is still alive.

But the problem is I can right click on the character to bring up the movement box but as soon as I left click it crashes. I can skip that character by pressing 'next character' but the movement on the others goes what looks to be a random direction.

I can send you a copy of the code if you want.




Image Edited by the Author.

 
Ever bitten off more than you can chew?

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
17th March, 2005 at 19:11:21 -

yes please. hawkeradam@hotmail.com is me. i just realised i was trying to help you a week or so ago - have you got much further? i tried changing the example i made at the time, to use the grid object, but for some reason it wouldn't work - any time i tried setting a tiles weight above 2 it went to -2, and i couldnt fix it so i gave up.
i'm busy experimenting with pathfinding without extensions - i've got a good idea how to do it, but i don't know if i'll be able to get it to work in practice.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
18th March, 2005 at 16:05:55 -

could you remove the sound or fancy graphics or something? - 9mb is way too big for me to download (i live in the middle of nowhere so can't get broadband).

i can't believe it needs to be that big - read an article or two about making games smaller.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click