MartinMystere911's Recent Forum Activity

  • I made some progress

    runtime.objects.Player.getFirstInstance().behaviors.Platform.simulateControl("left")

    runtime.objects.Player.getFirstInstance().behaviors.TileMovement.simulateControl("left")

    Works!!

    Howevever I still can not figure out the 8 direction version, user guide is no use.

    runtime.objects.Player.getFirstInstance().behaviors.8Direction.simulateControl("left")

    DOes not work!!!

  • Anyone?

  • I tried extending the behaviour as below

    class EightDirection extends IBehaviorInstance

    {

    constructor()

    {

    super();

    // Start with 5 bullets

    this.ammo = 5;

    }

    shoot()

    {

    this.ammo --

    }

    }

    And than tried to simulate as below

    if (keyboard.isKeyDown("ArrowLeft"))

    {

    EightDirection.simulateControl("left")

    }

    But I get a simulateControl is not a function error. PLease help.

    Tagged:

  • Sounds amazimg

  • I wonder why it is so small, does it look different than the screenshot I have posted here? I dont know how I can make it zoomable on the browser :(

  • Hi Everyone,

    I am working Javascript lessons to teach my self Javascript and to teach myself COnstruct 3 interaction with Javascript. Can check out first 5 lessons below.

    https://javascriptconstruct3.netlify.app/

    All feedback welcome.

    Reached lesson 15, coding in VISUAL STUDIO --> PUSHING IT INTO CONSTRUCT 3 --> PUSHING THE HTML EXPORT TO GITHUB USING GITHUB DESKTOP --> USING NETLIFY TO AUTOMATICALLY UPDATE THE SITE

    sounds complicated but I am a noob and once you get the hang of it, it is pretty straight forward

  • Wow this, worked. Thank you million. I have put the final code here for anyone who has the same problem.

    https://github.com/ilgazdemirel/JScriptsConstruct-3

  • I get this error --> printer.js:8 Uncaught (in promise) ReferenceError: runtime is not defined

    Can you test it out when you are infront of your computer? Thank you very much, this has driven me mad

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • const instance = runtime.objects.othersOutput.getFirstPickedInstance();
    
    

    I mean declaring this one within main.js or within print.js does not seem possible , it has to be declared within the event sheet. What do you think?

  • Thx a lot, so I see you have also used const instance = runtime.objects.othersOutput.getFirstPickedInstance(); within event sheet. I guess there is no other way right? Executing the whole thing through JS scripts only does not look possible.

  • Move the line

    > 	globalThis.statusTextInstance = runtime.objects.txtOutput.getFirstInstance();
    

    to the ePrinter event sheet. Either before the other line in the "Start of layout" trigger, or simply use the "On created" trigger of the text object.

    Wow this, worked. So is this the only way, can not do it solely on js script?

  • Oh I understand, but still can not figure out how to do it. Can you help me out?

MartinMystere911's avatar

MartinMystere911

Member since 6 Feb, 2020

Twitter
MartinMystere911 has 4 followers

Trophy Case

  • 4-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x2
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x3
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

10/44
How to earn trophies