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
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

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
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Sun Dec 11, 2011 1:40 am

It works perfectly, thanks Kyatric.
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

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
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

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
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

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.
B
44
S
12
G
13
Posts: 628
Reputation: 10,471


Return to Construct 2 General

Who is online

Users browsing this forum: Artpunk and 11 guests