wrightw's Recent Forum Activity

  • Got it!!! Thank you Ashley & Piranha!

    In my JS function call from within my event sheet, I simply added "runtime" as a parameter. Then I added "runtime" as a new parameter within my large function in the script sheet.

    Now my JS script can call a different function in my event sheet that simply updates a global variable. This was a good puzzle to solve for me, and I got to go into devel tools in Chrome. Learned a lot. Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ohh, I think this may work for me! I don't have my laptop with me but will try some things tomorrow. What's different than this example is that my function is in a script file. But it is being called by a javascript action in an event sheet, so perhaps the runtime is accessible in some manner. If not, I might just put more of my code into the script file, since it looks like for now it might be easier to access Construct object instances than trying to do some processing in a javascript function and some in an event sheet. Thanks for the thoughts, and if you have more, please share!

  • Ashley (and anyone else that understand this better than me!), thanks for the idea, but I don't have a runtime object. I've created a function that formats a string, and this function is called from my event sheet. From what I understand, the runtime is a parameter to some of the system functions, such as OnBeforeLayoutStarts(runtime). My function exists independently, so I don't think it has a runtime parameter. Either that or I'm completely wrong... this is all new to me. It's OK to tell me to wait until more samples exist! What I do know is that the runtime.callFunction() method isn't working for me, and I get an error in the development tools console.

  • Hello, I've written a JavaScript function in a script, and I would like it to update either a global variable string or an array, and I cannot figure it out. I know scripting is a recent addition, but is it possible for JS to update a string created in an event sheet?

  • Ashley, the gamejam sounds great, but right now I can't even complete the "Beginner's Guide"... i've got my background and main layers, but can't create the HUD. I'm a high school teacher, my students have Chromebooks, and i hoped to help them through the Beginner's Guide. How about upping the limit to 3 layers? Nothing dramatic, but enough to add a way to display the score? Thanks for the consideration!

wrightw's avatar

wrightw

Member since 11 Jan, 2014

None one is following wrightw yet!

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies