piranha305's Recent Forum Activity

    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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • 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...

piranha305's avatar

piranha305

Early Adopter

Member since 26 Apr, 2016

Twitter
piranha305 has 34 followers

Connect with piranha305

Trophy Case

  • 8-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • x5
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x4
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x2
    Lightning Draw First person to up-vote a new Construct 3 release
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies