Add a new property / Limit for plugin properties

Discussion and feedback on Construct 2

Post » Sun Dec 11, 2011 1:12 am

Hi,

Can we set a limit for ept_integer and ept_float for plugin properties in edittime.js ?
e.g., limits start at 5 and go until 15, if the user sets 4, the property automatically sets itself at 5 ??

If we can't, could the devs add it to their todolist, it will be REALLY helpful.
Thankssepteven2011-12-12 22:48:52
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 630
Reputation: 10,985

Post » Sun Dec 11, 2011 1:24 am

You can handle this in edittime.js, in the IDEInstance.prototype.OnPropertyChanged = function(property_name)
{
}

You can here test the value of property_name and assign as you intend to.
This function happens anytime a property is changed.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
268
S
96
G
66
Posts: 7,217
Reputation: 73,225

Post » Sun Dec 11, 2011 1:40 am

It works perfectly, thanks Kyatric.
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 630
Reputation: 10,985

Post » Mon Dec 12, 2011 10:50 pm

I ask a new question but directly in this thread instead of open a new one, @Kyatric may know answer me.

I would like to create a new array/property directly from the onPropertyChanged().

Is it possible ?
septeven2011-12-12 22:51:21
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 630
Reputation: 10,985

Post » Tue Dec 13, 2011 5:13 am

By "new array" I don't really understand but if by "new property" you mean a new property in the property panel... I don't think it's possible.
But I have a bad habit to be wrong these days.
B
63
S
22
G
14
Posts: 1,482
Reputation: 16,432

Post » Tue Dec 13, 2011 9:08 am

Thanks Yann, I asked to Ashley and he answered that is unfortunately not supported yet...
Hope it will.
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 630
Reputation: 10,985


Return to Construct 2 General

Who is online

Users browsing this forum: AllanR, anty21ro, arthurtomazz, ErekT, sielxm3d and 11 guests