How do I Create Object After First Object is Destroyed

Get help using Construct 2

Post » Sun Jun 26, 2016 11:21 pm

I want create first object (enemy) show start in layer, after I shoot this enemy is destroy, next show again other enemy.
How add event create again object in sequence, after first object is destroy NOT use timer but before object is destroyed?
so don't create object before first object is destroyed
Please show me how event sheet or give me sample .capx dropbox
Sorry bad English :mrgreen: Thanks
B
21
S
6
G
3
Posts: 67
Reputation: 2,946

Post » Mon Jun 27, 2016 1:42 pm

Condition > Sprite > on destroyed
Action : create
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Jun 28, 2016 1:59 am

99Instances2Go wrote:Condition > Sprite > on destroyed
Action : create


How create object one by one after first object show is destroyed?
B
21
S
6
G
3
Posts: 67
Reputation: 2,946

Post » Tue Jun 28, 2016 6:27 am

variable ToCreateOrNot = 0
variable ToCOUNTorNot = 0

On destroyed first
set ToCreateOrNot = 1
set ToCOUNTorNot = 5

system > Every 1 second
System > compare 2 values > ToCreateOrNot = 1
System > compare 2 values > ToCOUNTorNot = not 0
System > create an item
System > substract 1 from ToCOUNTorNot
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Jun 30, 2016 9:34 pm

99Instances2Go wrote:variable ToCreateOrNot = 0
variable ToCOUNTorNot = 0

On destroyed first
set ToCreateOrNot = 1
set ToCOUNTorNot = 5

system > Every 1 second
System > compare 2 values > ToCreateOrNot = 1
System > compare 2 values > ToCOUNTorNot = not 0
System > create an item
System > substract 1 from ToCOUNTorNot


Ok, I'll try again Thank you :D
B
21
S
6
G
3
Posts: 67
Reputation: 2,946


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, cb130felix, Kermad, nyuszi008, yiuyiu6666 and 6 guests