piranha305's Recent Forum Activity

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah... I know I am not artistic... But yeah I agree some color would be nice.

  • https://piranha305.itch.io/word-finder

    the game uses dreamlo and and firebase for the online leaderboard, you can download the project file and a dev log HERE

    Tagged:

  • I think there will be tradeoffs. The more something is abstracted out and made more high level, the more you lose the ability to customize it at a granular level.

    I remember products like Dreamweaver back in the day that was a wysiwyg web page creator. They had drag and drop html elements.

    Even with something like that there is still this tradeoff that happens. And to fully customize what you were making you had to dig deeper. If you use the high level tools you lose some control. And i feel like that leads to cookie cutter solutions.

    If you think moving to unity because you have to write a bit code in construct is going to speed up your development time you gonna be in for a surprise...

  • Couldn't you do this mapping in events? Kinda of how you map strings to function you can map dom element events to c3 functions. You would just need a bit more information such as the element ID and the event you want to map?

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
  • x6
    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
  • x5
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x3
    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