How do I call Function within Function ??

Get help using Construct 2

Post » Sat Feb 18, 2017 5:59 am

Message: mikq can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi
i have spent 3 nights trying to solve this without any hope !
my problem is :
i want when the Function ( CreateBlack ) executed , THEN the Function ( CreateRed ) should trigger !!
how can i do that ...... PLEASE
any help will be highly appreciated .

Image

Image


here is the CAPX :
www.dropbox.com/s/5c51qqy1f74r0q3/Creat ... .capx?dl=0
B
8
S
4
Posts: 7
Reputation: 714

Post » Sat Feb 18, 2017 8:51 am

Try this.
-Start layout
--call createblack
--wait 0.1
--call createred
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Sat Feb 18, 2017 8:55 am

You can also use wait 0 seconds instead of 0.1 so the player will not notice.

You can call CreateRed by putting it in a subevent with condition 'Trigger Once' inside CreateBlack.
Image Image Image
B
32
S
12
G
27
Posts: 761
Reputation: 17,246

Post » Sat Feb 18, 2017 11:18 am

Your problem is mostly referred to as 'pick newly created objects'.
Want to learn about it so you can avoid it in the future -----> https://www.google.be/search?num=100&newwindow=1&safe=off&q=scirra+pick+newly+created+sprite+site%3Awww.scirra.com

Both suggestions in above posts will help you.

But, then the chance that you end up with only 2 greenies is big. Only 1 greenie will happen too.

So here is an example :
https://www.dropbox.com/s/r3uq76y59dxd4 ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Feb 18, 2017 6:08 pm

99Instances2Go
your post help me a lot .. Thanks man .. i trust you always
---------------------------------------------------------------------------------------------------
MPPlantOfficial & clarkkentnicdao
thanks guys i really appreciate it
B
8
S
4
Posts: 7
Reputation: 714


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests