I'm a Noob, sadly, and can't manage to figure out how to get DoOnceOnly to work. i have only a very rudimentary knowledge of Java, (i'm assuming that's the scripting language) and am not very technical with this stuff. i wanted to get to know THE ENTIRE SCRIPT for something of a message to display when you first enter the room. i've read the tutorials but run into problems with the "Game" variable already being defined. this is driving me crazy to no end and i would like a complete script so i can use it for future purposes. i'm unsure where to put the whole "static bool..." thing, since "static" only refers to"member variables" or something like that. help a N006 out and i'll make it worth your while!
First, go to your room and select the Events pane (little lightning symbol).
Select the Enters room after fade in function, click the [...] button and alter the code to look like:
function room_AfterFadeIn()
{
if (Game.DoOnceOnly("firstroom1"))
{
player.Say("Yeah baby!");
Display("POTATO!");
}
}
Hope this helps :)
yes that does! i also found a little action for the room itself, for "first time in room", which was an easier way of doing what i wanted. excuse my noobiness for a little bit. but i'm currently working on a "drug adventure" game.
Yep, that is a useful function, but I decided to answer your question directly so you can use the DoOnceOnly function in the future (it's very handy!)
Good luck with your game, and just for future notice (though I am not a moderator), the best place for simpler questions like these is the Beginners Technical Questions (http://www.adventuregamestudio.co.uk/yabb/index.php?board=6.0) board :)
great! how sahould i make it worth your while? should i include you in the ACID FUELED ADRENALINE RIDE THAT IS DRUG TRIP 2011???