piranha305's Forum Posts

  • so I was able to access the arrays data using GetSdkInstance() there is an _arr property on that object, i'm guessing this is not recommend since the arr property is prefixed with an Underscore. what is the accepted pattern to access that array value?

  • So i'm at the point where i am getting the Array Instance, but i'm not sure how to access the properties of that array instance?

    So i'm logging back the correct object, just not sure where to get the property i'm looking for? I checked the documentation for the ObjectClass and can't really see where that would be?

    there is the savedData map but that null, the instVar arrays are also null? so i'm not really sure how the array plugin is implemented, but i know that the instance should at least have a savetoJson and loadFromJson method, if i can't directly access the array data i'm thinking maybe i can parse it's json do my work then save the json back to the array plugin, not really if that extra over head of parsing the json and writing it back will have a negative impact.

    but either way i'm not sure where i can call those methods on the instance?

  • Okay cool I was looking at the wrong place thanks

  • Okay, would it be possible to add some documentation (when you have some extra time) on how to get that the instances from the ObjectType

    The IObjectType interface does not have a method to pull the instances unless I'm looking in the wrong olace

  • Can't use also use the plug-ins interface by plugin version.. So the plugin extending can have the max version supported of the plugin type its extending and then there would not be breaking changes to the interface until the extension plugin is updated...? It should behave like every thing else that has dependency... Like npm in the package json you prefix your library with a version and that's the one your project support...

  • Okay I see, so right now what is exposed when you get that object as a Param? Does that get you the specific instance of the object or just the class?

  • like for example: lets say i have a plugin and one of the action has a param of type object, is there a way to only select object of a specific type like "ARRAY" or "SPRITE"

    and then in the implementation is there a way to access the properties of that given object,

    Like i'm thinking of like creating "ADDON Extensions", like for example lets say i wanted to extend the array plugin to have a randomize function like a specific implementation of a shuffle,

    Instead of recreating an array plugin with those actions, i want to have an ArrayExtention plugin which has property of type object that point to an existing Array Object. and have my actions manipulate it's data?

    Ashley Is there currently a way to do this?

  • Here is a finite state machine behavior for the C3 runtime

    https://www.construct.net/make-games/addons/172/fsm-finite-state-machine

  • How can you call comparison function like cr.do_cmp or cr. equal_nocase in c3 Conditions?

  • what is the cr object in c2 runtime? and is it used in c3? it's not mentioned in the sdk? is that because the sdk is not complete? or is it not used in the c3 runtime?

  • Check out the project i worked on for the GMTKJam, it's an RTS where you can't select you units, this was made in 48 hours. Please rate the game.

    piranha305.itch.io/kingdom-battle

    itch.io/jam/gmtk-2018/rate/300267

  • thanks!

  • So construct arrays are java script objects with some metadata about the array, i was wondering if any one has come up with an alogirthm to convert that json to a pure Java script array and back? I'm asking so I don't have to reinvent the wheel if its been done before.

  • true and false is suitable, but if I wanted the result of that bool to be dynamic based some other conditions I can't do it in line the action for set bool takes a hard-coded value for true and false... In order to do what I want I can use a function with sub events and based on those sub events set the bool... It just seems like alot extra work for something as trivial as setting a value.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is it possible to set a bool from an expression or from another variable, when I go set a bool I get a drop down with true and false. How can I make that bool dependent on something else or pass in a string "true" or "false" and just cast it, do i have to use an int? 0 1 to dynamically at that value?