Minifier changes name of Families?

For developers using the Construct 2 Javascript SDK

Post » Fri Aug 07, 2015 5:01 pm

I noticed that one of my behaviors wasn't working when minified, so I'm trying to make it work when minified.
I'm trying to compare the name of an Families:
Code: Select all
this.inst["type"].container[c].families[f]["name"]  === familyname

The objname is a string parameter passed to a function in the runtime.js
The problem is that the ["name"] value gets changed to some random string, so the value I pass in never equals the family name.

Is there some way to get this to work?
My goal is to be able to upload the game to the Arcade, but one of the requirements is that it must be minified.
B
45
S
21
G
65
Posts: 1,115
Reputation: 38,221

Post » Fri Aug 07, 2015 7:09 pm

I made a behavior to return the Family name based on an index value you pass to it for the family array..
Kind of lame, but it works.
If anyone knows of a better way, let me know.
B
45
S
21
G
65
Posts: 1,115
Reputation: 38,221


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests