[Plugin]Get combo list of instance variables name?

0 favourites
  • 10 posts
From the Asset Store
Combo
$10 USD
Button Combinations like in fightings, supports both keyboard and gamepads
  • This question is about creating plugin.

    When edit Condition:"Compare instance variable" in sprite, it can select instance variable by name.

    The name of instance variables seems to be shown in a combo box.

    In Plugin SDK:

    AddComboParamOption(text);
    AddComboParam(name, description, initial);

    How to get the name of instance variables to put in 'text' in AddComboParamOption? Or using another function for list the name of instance variables?

    Or where can I find the edittime.js of commanace.js?

  • Instance variable parameters are not available to the SDK. What did you need it for?

  • For example, to log the value of a property(i.e inst.X, inst.Y) or a private variable of instance.

  • I'm not sure what you're getting at. The user can always just pass an instance variable to a number/string/any param, can't they?

  • Yes, user can pass an instance variable like a number/string in expression.

    My plan is that user can assign an instance variable(index) in an action. And the (behavior)plugin will remember which variable need to be log. And then it doesn't need to call log action every tick.

    The interface is like the condition in sprite: "Compare instance variable" to get an instance variable(index)

  • Does varaiable("yournamehere"&loopindex) work?

  • I don't know

    varaiable("yournamehere"&loopindex)

    exactly means, sorry. Is it a condition with some expressions in event sheet?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Like name your instance variables "gun1", "gun2", "gun3", etc.

    Then in a system comparison within a loop compare variable("gun"&loopindex) with your other value.

    Might need a str() before.

  • Ah, sorry for my bad English.

    My question is not how to get instance variables in event sheet.

    My question is how to get instance variables' name(in engine, the name will be transfered to an index) in plugin, like the condition : "Compare instance variable" does.

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/getpvofinst.png" border="0" />

    More precise, how to get the combox input to select instance variablies in plugin.

  • Sorry for discussing this older topic again.

    I thought the GUI of "get instance variables' name" is existed(see the picture upper), so that the function is already existed.

    I know Ashley is very busy, could you please release this API for getting instance variables' name at future version?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)