Problem with Wait

Get help using Construct 2

Post » Sat Sep 02, 2017 6:34 pm

Hello !
I have 4 object that can die,
these 4 objects are in an object family

and when they die, I destroy object, then I do many action and use wait, and I create object.


and when they die, I call a function

Image

the function :
(IA = 0 it's a player and IA != 0 it's IA )

Image

When I remove wait, there are no bug, no problem
B
6
S
2
Posts: 21
Reputation: 542

Post » Sat Sep 02, 2017 6:52 pm

Hi ,
The function event will lose its parameters if you use wait action . You should make a local variable then save your parameters in it , and check the variable instead function.param .
B
18
S
8
G
2
Posts: 50
Reputation: 2,508

Post » Sat Sep 02, 2017 7:20 pm

Nop, not working,the player does not want to create itself.

Image
B
6
S
2
Posts: 21
Reputation: 542

Post » Sun Sep 03, 2017 8:44 am

The variable should actually be Global, not Local.

I recommend adding a small text box somewhere on your layout and use it for debugging.
So you could add something like this after Wait calls and see what's going on:
DebugText -> Append Text "Param:" & Param & " 2_0Spawn.X:" & 2_0Spawn.X
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,772
Reputation: 67,865

Post » Sun Sep 03, 2017 5:33 pm

It's okay :)
B
6
S
2
Posts: 21
Reputation: 542


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 1 guest