How do I make this battle to work?

0 favourites
  • 3 posts
From the Asset Store
Destroy planes and be the best pilot of your time!
  • Hi! I'm new in this forum!. Sorry for my bad english

    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

    To add information: There will be more instances of sprite and sprite 2, is like a Npcs battle.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yea, I would look into your timer first. Can you get a screenshot of the selected events? (Right click > Screenshot)?

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)