- Joined
- Nov 13, 2015
- Messages
- 58
- Reaction score
- 2
- First Language
- English
Hello again.
I'm at a loss of what's best to do. I need to call my functions that use game objects, and I need them to start when the game loads after the title screen. I can't seem to find a function to use to put my calls inside where this works.
An example would be using:
if (Input.isPressed('ok')) { console.log('space bar pressed');}I need this to work while the player is walking around, right after the new game, or continue, loads. I just have no idea what to throw it in, or if there is another way to hook a function to an already existing function so it executes on call, only after the game objects load. I've been looking and trying some for a while (nearly 2 days off and on), but without API or documentation it's increasingly difficult.
Everything I try returns null or doesn't start initially on the game load. Example:
(function() { // test key battle if (Input.isPressed('ok')) { console.log('space bar pressed'); }})();...returns null object with error.
I'd imagine an explanation and example would help a lot of newcomers to MV as well, so if anyone answers if they could explain a bit on why, etc. that'd be great.
P.S.
Forgive me on the deleted posts, my questions were redundant to things already answered, some by my own post from some help I got recently. I'll be a bit more careful and clear on my questions as best I can.
I'm at a loss of what's best to do. I need to call my functions that use game objects, and I need them to start when the game loads after the title screen. I can't seem to find a function to use to put my calls inside where this works.
An example would be using:
if (Input.isPressed('ok')) { console.log('space bar pressed');}I need this to work while the player is walking around, right after the new game, or continue, loads. I just have no idea what to throw it in, or if there is another way to hook a function to an already existing function so it executes on call, only after the game objects load. I've been looking and trying some for a while (nearly 2 days off and on), but without API or documentation it's increasingly difficult.
Everything I try returns null or doesn't start initially on the game load. Example:
(function() { // test key battle if (Input.isPressed('ok')) { console.log('space bar pressed'); }})();...returns null object with error.
I'd imagine an explanation and example would help a lot of newcomers to MV as well, so if anyone answers if they could explain a bit on why, etc. that'd be great.
P.S.
Forgive me on the deleted posts, my questions were redundant to things already answered, some by my own post from some help I got recently. I'll be a bit more careful and clear on my questions as best I can.
Last edited by a moderator:
