Example
Vault Zone
Long-time listener, first-time caller here. I'm still pretty new to the JavaScript game, but I wanted to challenge myself this week and see how far I could get.
This simple game has four scripts running on the base layer:
🔦One hides the cursor and moves the flashlight with the mouse
🏞 One moves the background (and target area) as the cursor pans left and right
⏱ One handles the countdown timer
🎯 One checks if the user has found the target and triggers the "You Win" layer
The “You Win” and “Time’s Up” layers each include a small script to bring the cursor back after the game ends.
With more time, I’d love to make the "computer screen" graphic with onscreen text more dynamic - but for this version, I really wanted to nail the core mechanics.
I relied on ChatGPT for a lot of the JavaScript support, but honestly, I learned a ton through the process - especially having to figure out where things were off or how to adapt code to work with Storyline’s triggers and native capabilities.
https://360.articulate.com/review/content/24c010db-096a-49a5-a1d8-11d83f908b12/review
5 Replies
- ThierryEMMANUELCommunity Member
I think you've given a very good demonstration of what can be done with JavaScript, and NOT with SL's native functions. Well done! I'm curious about 3 (maybe 4) codes you used. Is there any way you could share the file so we can study them? KateMau
- KateMauCommunity Member
Whoops! Sorry about that! I just updated the post with the file. Hope it helps with some explorations!
- TeresaIden-9681Community Member
Excellent! KateMau​ I agree with Thierry, you've really shown how it can be used well! If you can share the file, that'd be great! If not, I'd love to have the code to play around with anyway.
- KateMauCommunity Member
Thank you! I just updated the post with the file. Hope that helps with some explorations :)
- ThierryEMMANUELCommunity Member
Thank you very much KateMau​ Your .story file is really very useful to study, to be able to reuse these 4 little codes quite cleverly as you did, as it's not too much and yet just beyond SL's native possibilities.