piranha305's Forum Posts

  • When u use a variadic parameter, it's still calling one expression. It just returning an array as a Param.

    So I would need to handle all the cases in that expression to account for all the Parameters I'm expecting.

    I guess if the max Param I'm expecting is 3 I can just ignore every other Param after that.

    As for documentation? Can u document the parameters? In a variadic function?

  • Is there a way to create Expression overloads??

    for example

    let's say i have 2 expressions Sum(a,b) and Sum(a,b,c)

    is there a way to have both of these expression share the same expressionName but have construct determine which one to use based on the number of param passed in? this is a very trivial example which we can use varadic param for? but i'm think of a more complex example which a varadic param cannot be used, i'm just wonder if there is a way to have the same expression name instead of having to add a separate name for each function?

  • Is it possible to have a container with multiple of the same object object type? i want to have a container that has 1 instance of Object A and 2 instances of Object B? is this possible?

  • Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I saw the changes made to the documentation for the Array And Dictionary API, this is very cool stuff! on the array there is SetSize(w, h, d) is it possible to also get GetSize methods either one GetSize which would return the array of sizes [w,h,d] or a GetWidth(), GetHeight(), GetDepth(), just some type of way to pull that data to make iterating easier since we don't have access to the actual array reference to get length.

  • Quick question, so in order for the plugin to actually draw it has to be a "World" type plugin? is there a way to have a Single Global Plugin call the Draw function of the instance? SDKInstanceBase does not seem to have the Draw method where i can access the renderer, only SDKWorldInstanceBase.

    so for the plugin i'm creating it's currently a single global plugin, which holds an array of x,y coord, on every draw call i'm trying to draw a line between all points, but since it's currently extending from SDKInstanceBase the Draw method is not being called.

  • okay so addon owner would need to expose whatever property to make it extensible. i think there is alot of value in exposing some of these property to some of the built in addons, currently i have only been dealing with the array plugin, but i see where this type of thing can be very useful for some of the other plugin types, what i will do is, when i stumble onto a property i think might be beneficial i will add a suggestion for it, in the idea portal, then you guys could let me know if its possible or not! the new c3 runtime api is very clean! great stuff.

    ohhh... one more question before i stop bother you! is there a way to invoke actions / expressions from the that instance? in a plugin do i have access to Cnd,Act,Exp where would those objects be? or are those kept private?

  • 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