piranha305's Forum Posts

  • added a suggestion for this

    https://construct3.ideas.aha.io/ideas/C3-I-1144

  • Ashley

    in the scripting api, its possible to have your instances listen to events emitted by several addons/runtime.

    how can these events be triggered from 3rd party addons in the sdk?

    is the event system between the two compatible? in the sdk there is the runtime.Dispatcher but it seems only the listening events are exposed? will there be a way to emit our own events from the sdk, and be able to listen to them in javascript?

    Tagged:

  • Is there an event to enable or disable the set angle property of the moveto behavior

    This feature is really awesome, thanks for implementing this!

  • Great feedback thanks yeah, I wanted to start really basic, but yeah I'll get into all those things in later videos

  • Created a new video showing how to create a basic addon using c3IDE

    Link

    https://youtu.be/mftBOgBMUuY

    I plan on creating more videos to demonstrate how to create other types of addons with c3IDE

    #shameless plug :

    I have another video series i am working on a mobile game from scratch where i use the new java script and how i mix that with events and all that stuff

    https://youtu.be/se0cmfB-iEM

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Here is a quick exmaple of how i have done the conversion in the past

    here is the c3p file

    https://drive.google.com/open?id=1SeUkVyk3SzIXhc5UNTBOXW-55ldiE1yp

  • yep that worked, forcing the function to pick it, and changing the getAllInstances to getPickedInstances worked thanks

  • Hmmm let me try that out... And see if the instance gets picked

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay thanks for the explanation, based on that I will move the creation logic to the script to have access to the instances thanks

  • Ashley I was wondering if this is expected behavior? or if i should file a bug for it, so basically inside a trigger i am create some spritefont instances inside that same trigger after the spritefont instances have been created i set some properties, then i call a function. inside that function i am just trying to log all the instances of the sprite font to the console. those 2 arrays always come back empty when using getAllInstances, if i use getFirstInstance that reference comes back null, if i add a wait 0 seconds before calling the function those objects are then logged as expected.

    I did a bit more testing and moved the java script block inside the trigger, and got the same result it seems like created instances are only available in the java script api on the next tick after they are created

    so i got a bit more curious, and i tried to execute the javascript on the on created trigger for the sprite font, and that also came up with the same results... empty array

    when creating instances in events and trying to modify them through the javascript api are there any other ways to access the created instance in the same tick? or is wait 0 the recommended approach. would it be possible to attach hooks on the life cycle of an instance, like we have hookson the lifecycle of layout?

    runtime.object.Instance.oncreated = () => { ... }
    
  • I currently have 2 games that demonstrate how to mix events and java script, they are not really tutorials but going through might help a bit. you can get the c3p files here

    https://www.patreon.com/posts/tank-trax-clone-28597133

    https://www.patreon.com/posts/word-finder-28761484

    with that said It would be nice to see some more official templates integrating the scripting feature

  • Yeah I since have updated to use firebse directly log should have update at the bottom.

    And the not seeing your score is an oversight...