reference the object I just created?

Get help using Construct 2

Post » Fri Jul 26, 2013 4:08 pm

Here's the link to my capx

I created a family in it just to try out if it would affect anything, but like I suspected it changes nothing.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Nov 01, 2013 7:21 pm

As a follow up to LittleStains' example, can I use the created instance of Sprite3 in a sub-event?

For example, can I have a sub-event that checks the created instance of Sprite3's position and perform actions based on that?

Thanks.
B
5
Posts: 11
Reputation: 272

Post » Fri Nov 01, 2013 7:22 pm

@moonraystudios

Yes, you can. Best way to go about it might be to use 'On sprite3 created' trigger and do your stuff there.
B
24
S
9
G
7
Posts: 756
Reputation: 7,302

Post » Fri Nov 01, 2013 7:29 pm

Thanks.

The sprite created trigger isn't available when I try to create a sub-event though.

I can do that for a regular event, but then it will affect all created sprite3's, not the one I have just created.
B
5
Posts: 11
Reputation: 272

Post » Sat Nov 02, 2013 12:49 am

Use an instance variable, set it to 0 for those sprites you don't want to be affected by the on created event, set it to 1 for those who should be affected. Then just add another condition to the on created event (instancevar = 1).
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Mon Nov 04, 2013 2:52 pm

Awesome. Thanks.
B
5
Posts: 11
Reputation: 272

Previous

Return to How do I....?

Who is online

Users browsing this forum: Darknessed, Yahoo [Bot] and 39 guests