Reference a specific instance of an object in expressions

Get help using Construct 2

Post » Fri Jul 29, 2016 8:42 pm

For example, if I want to spawn an object in the area in the middle of two sprites:

https://onedrive.live.com/?authkey=%21A ... 05&o=OneUp

But how can i make reference to specific instances here?
B
20
S
4
Posts: 387
Reputation: 2,274

Post » Fri Jul 29, 2016 10:08 pm

Some pick condition.

x= random(object(0).x,object(1).x)

Asuming the pickconditon only puts 2 objects in the Selected Objects List.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Jul 30, 2016 5:09 pm

@99Instances2Go
Thanks for the answer!
Unfortunately, I can't understand what your suggesting.
My real doubt is about the possibility of referencing a particular instance of an object just in the expression, without conditions.
B
20
S
4
Posts: 387
Reputation: 2,274

Post » Sat Jul 30, 2016 6:09 pm

Yeah.
x= random(object(0).x,object(1).x) <--------------- translated

object(nth).expression

Where nth is the IID in a SOL. No SOL, ...NO meanigfull IID. No pickevent no SOL


Now answhering again the 'here' in your question:

Some pick condition.
x= random(object(0).x,object(1).x)
Asuming the pickconditon only puts 2 objects in the Selected Objects List

Or did you post that image just to confuse poeple ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Jul 30, 2016 11:17 pm

@99Instances2Go
Yeah, sorry :(
I wasn't clear enough.
But now i got it! I didn't know about this "(instance number)" after the object name hehe

Thank you very much.
B
20
S
4
Posts: 387
Reputation: 2,274


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 4 guests