instances

For questions about using Classic.

Post » Wed Mar 11, 2009 7:20 pm

I made an instance of a sprite by holding CTRL and dragging the mouse.

When an event uses this sprite, how does it know which instance to choose?
The most recent created instance?
B
16
S
5
G
7
Posts: 599
Reputation: 5,000

Post » Wed Mar 11, 2009 8:15 pm

You need to look a bit on picking and conditions
[url:1kpzm9i9]http://apps.sourceforge.net/mediawiki/construct/index.php?title=Conditions[/url:1kpzm9i9]

If you dont have any picked instances the action will work on all instances. But some events picks one or more instances. The following action will then only affect the picked instances.

For example if your event condition is "is X overlapping with Y : destroy X"
will only destroy instances of X that are actually overlapping with a instance of Y
(if you set the pick options correctly)

in pseudo code it is will behave a bit like this.
for each pair (x, y) where x is an instance of X and y is an instance of Y.
if x and y is overlapping:
destroy x.

Cheers
B
4
G
3
Posts: 46
Reputation: 992

Post » Thu Mar 12, 2009 10:21 am

Thanks.
B
16
S
5
G
7
Posts: 599
Reputation: 5,000


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests