Object type class variables / instance type variables

For developers using the Construct 2 Javascript SDK

Post » Tue May 03, 2016 8:00 pm

Newb question here:

If I create an object type variable it'll basically be static like in c# right?

Like, I was needing a behavior that needed to know how many other behaviors of the same type were enabled. The ones that are enabled need to "talk" to each other from time to time. I thought having static variables would be the way to do it it but I seem to never know for sure what is happening in jscript lol.

Does anyone know of a behavior that uses class types variables and how they function?
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Post » Wed May 04, 2016 2:10 am

Yeah, putting variables in the type would be like a static variable because the type is created only once during the whole game. I've done that before with my isometric behavior.
B
92
S
32
G
109
Posts: 5,294
Reputation: 70,999


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests