How do I reference instance variables in fields

Get help using Construct 2

Post » Mon Apr 14, 2014 11:16 pm

How do I reference specific instances of an object in a field.

ie if I want to set a variable to the value of an instance variable for an object without picking that object in the logic.

Basically what I want to do is get the sum of all values for an instance variable of an object at any given point in time. Is there a simple way to do that?
B
5
Posts: 26
Reputation: 977

Post » Mon Apr 14, 2014 11:29 pm

Possibly multiplying the variable by object.count.

So Object.count*(variable) = variable that you want to find.
B
8
S
1
Posts: 76
Reputation: 949

Post » Tue Apr 15, 2014 5:14 pm

The problem with that is the variable will have different values depending on the instance
B
5
Posts: 26
Reputation: 977

Post » Tue Apr 15, 2014 5:22 pm

Try this:
pickSum.png
You do not have the required permissions to view the files attached to this post.
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Tue Apr 15, 2014 6:30 pm

Thanks!
B
5
Posts: 26
Reputation: 977


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948, ultrafop and 11 guests