eliminate enemies according to an order.

Get help using Construct 2

Post » Wed Jun 27, 2012 10:13 pm

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
B
12
S
4
G
4
Posts: 138
Reputation: 3,710

Post » Wed Jun 27, 2012 10:48 pm

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 herekbdmaster2012-06-27 22:50:10
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Thu Jun 28, 2012 1:54 am

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.
B
12
S
4
G
4
Posts: 138
Reputation: 3,710

Post » Thu Jun 28, 2012 2:23 am

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
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Thu Jun 28, 2012 3:02 am

[QUOTE=zsangerous] 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
[/QUOTE]



mmm very good your eplicacion
in this way is easier for me thank you very much.
B
12
S
4
G
4
Posts: 138
Reputation: 3,710

Post » Thu Jun 28, 2012 3:16 am

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,...)
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Thu Jun 28, 2012 5:46 am

tks!!
B
12
S
4
G
4
Posts: 138
Reputation: 3,710


Return to How do I....?

Who is online

Users browsing this forum: currypuff, makotto, Yahoo [Bot] and 19 guests