advice
2 TopicsButton Listener to move a character
Hello everyone I've dealing with a problem, I started a project, it is supposed to be an Escape Room, and most of the things I need for it are already available on Storyline. But I've been stuck on the movement of the character, it is a simple 2D movement, right and left, inside the room. The problem is: I already got it to move on a click, but it is just on that click, I want it to move as long as I keep the button pressed. This is the last JavaScript I tried to make it move: const button = object('5yfHufFxicy'); function moveWhilePressed() { button[i].addEventListener("mousedown",() =>{ const player = GetPlayer(); player.GetVar("MousePressed"); const currentX = player.GetVar("MoveX"); player.SetVar("MoveX", currentX +1); setTimeout(moveWhilePressed, 100); const objects = [ object('6EPGwyDzEfX'), ]; const positions = objects.map(obj => ({ x: obj.x})); objects.forEach((obj, i) => { obj.x = positions[i].x+currentX; }); }); } moveWhilePressed(); Not sure if I'm wrong on the EventListener, before I added it, the character moved, but the moment I clicked, it kept moving without the button pressed. I tried using Variables, but the result was the same, the character kept moving.Solved182Views1like4CommentsAssistance Needed: Enabling Easy Copy & Paste for ChatGPT-Generated Vision Statements in Storyline
I created a slide using a ChatGPT-generated response where users input their name, role, goals, and future position. After clicking "Submit," ChatGPT generates a personalized Vision Statement for them. I want users to be able to copy this Vision Statement easily and paste it into a Word document. Is this possible? If so, can someone guide me on how to set this up using JavaScript?Solved98Views0likes2Comments