Fangames > Programming Questions
Making an object show only once?
BoshyMan741:
Does anyone here know how to make objects only appear once. (In Gamemaker 8.1) Kinda like the warnings in Happil 2 how they only appear once until you reset/press esc. No one on skype knew how. :BibleThump:
pieceofcheese87:
Make it a persistent object. Have it become invisible instead of destroying itself, and it destroys itself on the room end event
Sephalos:
Global variables would do the trick. Simply do something similar to this.
--- Code: ---If global.warning[1] = 0 {
// put your warning script here
global.warning[1] = 1;
}
--- End code ---
Global variables are persistant until you close or reset the game (or until you reset them to 0 manually). The number 1 within the square brackets can be changed so you can have many different warnings in your game.
BoshyMan741:
Thank you! :BloodTrail:
BoshyMan741:
Oops... By reset I meant as in pressing F2 not R. Is there a way to change it?
Navigation
[0] Message Index
[#] Next page
Go to full version