Hey everyone.
A while ago I was working on a fully evented multiplayer turn based battle game. The game was quite simple. It gave two players the option to choose between a slew of characters. Then each player took turns. They each had 5 spaces to move within the map, then they could rest, heal, or attack. Rest would restore one energy, heal would restore one hit point out of ten, and attack would allow them to choose from different attacks. Ranged, melee, and magic. Each successful attack gave the player experience and when they had enough, they could learn a new attack, get new weapons, armor, and so on and so forth between each round/game. It was quite epic actually and it would have been extremely addicting had I finished it.
My problem was/is this. I had no idea how to use events to check to see if the two players were close enough for melee, or far enough for ranged. So I came up with this idea. Let me know if you think it would work correctly. (My girlfriend is an aspiring math teacher and she helped me out a bit... I'm NOT an aspiring math teacher. XD)
I used a common event to record the first and second player's x and y coords. Next, I checked to see which was higher between the x's. The lower of the two coords was then subtracted from the higher. Then the same was done for the y. Then I checked to see which was higher between x and y. Then the lower was subtracted from the higher. If the end number was less than 2, a melee attack would be successful, if not, a melee attack would get a "too far away" message. A ranged attack, however; would be successful unless the range was over 5 spaces.
This was the only way I could see to get the game to work. But after I ended up getting ONE segment of this to work, then something else would go wrong, and eventually, the entire system would stop working all the way back to the "IF variable: 'move' is >= 1, move up." stopped working and you couldn't even move the players. Ultimately I gave up because it got so complicated. But if I could get some advice on how to simplify the game, I'd like to give it another shot. The prototype game was quite fun. lol.
I know this post is extremely confusing, but I honestly don't think I can simplify it anymore than it already is.... I'm sorry!
Thanks
A while ago I was working on a fully evented multiplayer turn based battle game. The game was quite simple. It gave two players the option to choose between a slew of characters. Then each player took turns. They each had 5 spaces to move within the map, then they could rest, heal, or attack. Rest would restore one energy, heal would restore one hit point out of ten, and attack would allow them to choose from different attacks. Ranged, melee, and magic. Each successful attack gave the player experience and when they had enough, they could learn a new attack, get new weapons, armor, and so on and so forth between each round/game. It was quite epic actually and it would have been extremely addicting had I finished it.
My problem was/is this. I had no idea how to use events to check to see if the two players were close enough for melee, or far enough for ranged. So I came up with this idea. Let me know if you think it would work correctly. (My girlfriend is an aspiring math teacher and she helped me out a bit... I'm NOT an aspiring math teacher. XD)
I used a common event to record the first and second player's x and y coords. Next, I checked to see which was higher between the x's. The lower of the two coords was then subtracted from the higher. Then the same was done for the y. Then I checked to see which was higher between x and y. Then the lower was subtracted from the higher. If the end number was less than 2, a melee attack would be successful, if not, a melee attack would get a "too far away" message. A ranged attack, however; would be successful unless the range was over 5 spaces.
This was the only way I could see to get the game to work. But after I ended up getting ONE segment of this to work, then something else would go wrong, and eventually, the entire system would stop working all the way back to the "IF variable: 'move' is >= 1, move up." stopped working and you couldn't even move the players. Ultimately I gave up because it got so complicated. But if I could get some advice on how to simplify the game, I'd like to give it another shot. The prototype game was quite fun. lol.
I know this post is extremely confusing, but I honestly don't think I can simplify it anymore than it already is.... I'm sorry!
Thanks