Someone plz explain this to me.

Discussion and feedback on Construct 2

Post » Tue Jun 20, 2017 9:12 pm

You can create an instance, change any of its values, then create another instance, and change any of its values, all in the same tier.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Wed Jun 21, 2017 10:19 am

WRT to the first "not working" one.

You are not pick/ using anything at the click trigger event
C2 goes on to process the two individual sub events of the click trigger "at the same time" so
At point of first click trigger no sprites exist atop of the blue box and at the "same time" you are creating a sprite (but there are no sub events to use it as picked)
Sprites will be destroyed over the blue box on second and subsequent clicks but there will always be a sprite that is not destroyed as it is also created at the click trigger and never pick/used for anything.

On the second "working" one, at the click-trigger, the sprite is created so picked for use in sub events and then destroyed in the sub event. I am using these sort of events all over my game.

I don't see any issues,,, and am very glad to see C2 working like this it means that it is very robust and is treating trigger events properly...
...
B
46
S
24
G
7
Posts: 319
Reputation: 8,201

Post » Fri Jun 23, 2017 7:56 am

Quoted :

NetOne wrote:Just for my own understanding... (because I keep seeing this subject pop up and I never understand it)

I am quite deep into my project,
must be 600 events in total now,
In game I am creating dozens of enemies and in subsequent events or sub events I am changing their instance variables, positions and pinning stuff to them etc at the point of creation. and as far as I can see everything is working well and smoothly. I have never ever needed to use wait 0 seconds for a anything, I don't even know why or when I would need to use it, it sounds like a hack, could someone enlighten me?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jun 23, 2017 9:14 am

@99Instances2Go

it's ok man, I hold no pride in this forum, im here to learn (and help if I can)...
so please continue....

your point being...? ...that you can use wait 0 between the sub events in your first example to make it "work" ?
...
B
46
S
24
G
7
Posts: 319
Reputation: 8,201

Post » Fri Jun 23, 2017 1:51 pm

Hey guys,

I posted a question about this particular topic a few days ago, and got fully replied. With additional search I now understand this tricky thing.

You can read the post here : viewtopic.php?f=146&t=192965

Though Ashley's visual explanation is probably the only thing you need. Couldn't be clearer.

I hope it helps. ;)
B
32
S
6
G
1
Posts: 353
Reputation: 2,821

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: newt and 6 guests