Posts: 7
Threads: 3
Joined: Apr 2010
Lets say i put a script in the beginning of the game right where you start. so after you leave the place, you go back to it and the same script replays. How do i make so the script on plays once no matter what? SOS!!!
Posts: 105
Threads: 10
Joined: Mar 2010
Could you elaborate a little? Are you saying you've made an event and you don't want that event to repeat itself, or you've called a script? Try and explain a little more so someone can help you. Take screen shots if necessary.
Posts: 201
Threads: 14
Joined: Nov 2009
It seems like he uses a script that supposed to do something to an event, or something graphical, and he want's to get rid of it afterwards, only making it appear whenever he wants to.
I'm sorry, but it some scripts (Most likely on almost all of them), you can't get rid of them unless the script has the instruction on how to remove it, usually done by a script command I believe.
Best bet is to work your way around it or remove it, unless someone has a bright idea.
Posts: 1,664
Threads: 391
Joined: May 2009
I'm really not sure if I can help as I'm not too good of a scripter compared to the other guys, but I'm assuming he wants a script to do something to a particular map once.
What the scripter may need to do is create some sort of an instance variable which would act as an array, or maybe a hash. Yeah, maybe hashes would work better than arrays since they're more precise.
Code:
@variable = {} #instance variable is a hash.
Afterwards, the scripter would need to create an if condition somewhere, which may look something like this (I could be very much wrong, as I'm pretty rusty in scripting):
Code:
if @variable{$game_map.map_id} != true
# The script does something here.
@variable[$game_map.map_id] = true
end
Werehog5 just needs to tell us what script(s) he's using, that way it'll help us help him faster.