How do I make this battle to work?

Get help using Construct 2

Post » Mon Jan 18, 2016 2:20 pm

Hi! I'm new in this forum!. Sorry for my bad english :oops:
This is my last option because i've been trying make this to work by few methods.


I have a Sprite and Sprite2 in poles apart ( Sprite ---------------------------------> Sprite2 )
Sprite have Bullet behaviour and when i click a button, Sprite start to move to Sprite2

i have this:

- For each Sprite:
-------Sprite is overlapping Sprite2 at offset (10,0) ---> Sprite set bullet speed 0
--------------------------------------------------------------------------- Sprite set Attacking True (Attacking is a instance variable)
-------system else--> Sprite set bullet speed 50
-----------------------------Sprite set Attacking to false

-------Sprite is Attacking --> Start Timer "Attacking" for 600 (once)

-------On Timer "Attacking"-->
-------------Sistem Everytick --> Sprite2 Substract 5 to Life (This life is a instance variable, have 30 initial number)

-------Sprite2 Life <or equal to 0 --> Sprite2 Destroy
-------------------------------------------------Stop timer "Attacking"

All this in For each Sprite
My idea is when Sprite arrive to sprite 2, sprite atack him! dealing 5 per second. When sprite2 is "dead" Sprite continue his way until collision with other instance of Sprite2. Like a Strategy Game.

but the problem is that Sprite when stop dont deal 5 per second and dont destroy Sprite2, Maybe i've done the timer incorrect? Thanks!! and sorry again for my english :oops:


To add information: There will be more instances of sprite and sprite 2, is like a Npcs battle.
B
4
Posts: 8
Reputation: 218

Post » Tue Jan 19, 2016 5:10 pm

Yea, I would look into your timer first. Can you get a screenshot of the selected events? (Right click > Screenshot)?
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,340
Reputation: 4,674

Post » Tue Jan 19, 2016 9:32 pm

i've found another method for fix it, with "combo" variables. But thanks!!!
i want to ask other thing. In case of Age of war, Battle Cats, Cartoon Wars like games.
The best way for make the "troops" is with a sprite detector atached to animation or without this detector? ( for detection when collide the troops and then attack)
Because i'm doing without detector, and i'm not sure if is the best way.
B
4
Posts: 8
Reputation: 218


Return to How do I....?

Who is online

Users browsing this forum: marcoscodas, raulcg1981 and 10 guests