Help with combat system

Get help using Construct 2

Post » Sat Dec 28, 2013 1:07 pm

I am still getting my arms around Construct 2, so far with the help of this forum I have been able to create a tile based map where a hero can walk through the map and encounter monsters. I am now onto the combat phase of things, and need a bit of help.

On my map I have (1) Hero and (3) monsters. When I collide with a monster I capture the UID of the monster I collided with in a global variable CurrentCombatant. I also set a global variable IsCombat to 1.

The hero has the option of [A]ttack or [F]lee. If they flee, I allow movement again by setting IsCombat to 0. If they attack, I'd like them to roll to hit (random, easy enough), compare to the defense of the current monster (I only want damage applied to the CurrentCombatant), and if I hit, apply damage. With a sub-event I check to see if the monster is dead. For some reason, ALL instances of the monsters are destroyed, when it should be the specific instance.

Then I want the monster to attack using the same combat mechanism as the hero.

Where I am struggling is with the sequence of events ... I can get the hero to attack no problem, doing it all within the A key press event. I just can't seem to get the monster to attack.

Is there a simple example that someone can point me to, would be much appreciated.

https://www.dropbox.com/s/xshwtg2wb1mi2os/ForeverQuestGridMovementWithBoard.capx
B
17
S
3
Posts: 33
Reputation: 1,666

Post » Sat Dec 28, 2013 1:12 pm

Fixed the issue with the destruction of all monsters, just need to sub event on the Pick Instance with UID, now just need to figure out how to add the monster retaliation attack.
B
17
S
3
Posts: 33
Reputation: 1,666

Post » Sat Dec 28, 2013 1:55 pm

I think I have it figured out ... calculations look good, just not sure if the events are firing sequentially ... would appreciate another set of eyes to review the project in the original post.
B
17
S
3
Posts: 33
Reputation: 1,666


Return to How do I....?

Who is online

Users browsing this forum: John Cutter and 10 guests