eliminate enemies according to an order.

  • the situation is this, I have a player and four enemies. enemy 1, enemy 2, 3 enemy, enemy 4

    to exit the level, you have to take out enemies in the following order

    3 enemy, enemy 2, 1 enemy, and finally enemy 4.

    wanted to do with conditional, thank you very much

  • I have The solution !! You will need only 1 enemy Object

    You can make a global variable that stores Enemy Destroying Order

    We can Call It DOrder :

    And then ---

    Add an Instance Variable to the enemy Object

    InsOrder :

    Make 4 Instances of The enemy Object

    And set the Instances Order

    For example :

    Enemy ( Instance 1 ) = InsOrder : 1

    Enemy ( Instance 2 ) = InsOrder : 2

    Enemy ( Instance 3 ) = InsOrder : 3

    And to Finish ..

    Add this Script :

    Condition :

    • Place the Condition that destroy the enemy object -

    System - DOrder = Enemy : InsOrder

    Event :

    Destroy Enemy

    ----------------------

    End Of Script

    Sorry , If I made it Too Hard

    Oh , and if yo don't know what an Instance is :

    Go here

  • mmm not really know much about the functioning of the bodies and the translator does not help me.

    I'm from Colombia and I have the problem of bad translations.

  • ok i don't know if you understand this ^^ but here is the way you will put 1 object with 4 frames or 4 animation but all has same name like (enemy1,...)

    so this object will have boolean variable and put a global variable = 1 so now event will be like this :

    event1:

    condition: system :compare two value --> global = enemyobject.frame

    action: set boolean = true

    event2:

    condition1:player colision with enemyobject

    condition2:system: compare two value --> enemyobject frame = global

    condition3:enemyobject is boolean

    action1: enemyobject destroy

    action2: system add 1 to global

    event3 :

    condition1:system : compare two value --> enemyobject.count = 0

    action: go next layout

  • ok i don't know if you understand this ^^ but here is the way you will put 1 object with 4 frames or 4 animation but all has same name like (enemy1,...)

    so this object will have boolean variable and put a global variable = 1 so now event will be like this :

    event1:

    condition: system :compare two value --> global = enemyobject.frame

    action: set boolean = true

    event2:

    condition1:player colision with enemyobject

    condition2:system: compare two value --> enemyobject frame = global

    condition3:enemyobject is boolean

    action1: enemyobject destroy

    action2: system add 1 to global

    event3 :

    condition1:system : compare two value --> enemyobject.count = 0

    action: go next layout

    mmm very good your eplicacion

    in this way is easier for me thank you very much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yes since i jioned the forum i saw that everyone talk as a devoloper they don't talk as a construct user :P so even me i started with talk like them for example they call( everytick condition with always) and(event with if)

    and when i notice that its really hard to know these stuffs as we are a beginners so i started to use the words that construct users should use (condition,action,event, properties, plugin,behaviors,...)

  • <img src="smileys/smiley36.gif" border="0" align="middle" /> <img src="smileys/smiley36.gif" border="0" align="middle" /> <img src="smileys/smiley36.gif" border="0" align="middle" /> tks!!

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