azza1989 Posted April 21, 2012 Share Posted April 21, 2012 Hi,im wanting a script to run once the game has loaded / or at the beginning of the game how can i achieve this? Any help appreciated, thanks Link to comment Share on other sites More sharing options...
LittleBaron Posted April 21, 2012 Share Posted April 21, 2012 You need a quest that runs once, and is game-start enabled. You'll use the 'OnInit" event. Make sure that 'runs once' box is checked or the script will fire twice. :thumbsup: Also, in your script, once what you want done is accomplished, tell it to self.Stop() to wrap it up. -LB Link to comment Share on other sites More sharing options...
azza1989 Posted April 21, 2012 Author Share Posted April 21, 2012 You need a quest that runs once, and is game-start enabled. You'll use the 'OnInit" event. Make sure that 'runs once' box is checked or the script will fire twice. :thumbsup: Also, in your script, once what you want done is accomplished, tell it to self.Stop() to wrap it up. -LB thanks, got it working :) Link to comment Share on other sites More sharing options...
azza1989 Posted April 21, 2012 Author Share Posted April 21, 2012 edit: nope it didnt work :( plus whatever i did broke the opening cart scene any help? thanks Link to comment Share on other sites More sharing options...
LittleBaron Posted April 21, 2012 Share Posted April 21, 2012 Post the script here. Link to comment Share on other sites More sharing options...
azza1989 Posted April 21, 2012 Author Share Posted April 21, 2012 Post the script here. hi, i was using this someone else posted Scriptname MyModsInstallScript extends Quest ;=========================================== Event OnInit() ; My code runs here ... RegisterForUpdate(5) Debug.Notification("[MyModsInstallScript] has been installed") EndEvent ;=========================================== Event OnUpdate() ; This block gets called by the game every 5 seconds... ; Do my cool stuff here. Debug.Notification("[MyModsInstallScript] The OnUpdate event has been called.") EndEvent ;=========================================== the messages display fine but how do i add mods to this?examples please :) Link to comment Share on other sites More sharing options...
Korodic Posted April 21, 2012 Share Posted April 21, 2012 this code doesn't explain what your script does... So how are we to know what is breaking the cart scene? If you're going to ask for help, I'd post the whole code up. Besides, if someone really wants to see your code they can just download your mod and use tools to get to it. Link to comment Share on other sites More sharing options...
azza1989 Posted April 21, 2012 Author Share Posted April 21, 2012 this code doesn't explain what your script does... So how are we to know what is breaking the cart scene? If you're going to ask for help, I'd post the whole code up. Besides, if someone really wants to see your code they can just download your mod and use tools to get to it. it does explain :/the script is called every 5 seconds the message displays every 5 seconds but im also wanting mods to load every 5 seconds e.g - full health every 5 seconds Link to comment Share on other sites More sharing options...
Korodic Posted April 21, 2012 Share Posted April 21, 2012 The code above is just a shell. There is no actual commands inside the events, just comments that say ";do cool stuff". Without knowing what that is, I cannot help you figure out why it is causing a problem. You want full health every 5 seconds? Why O.o? There are other ways to go about doing that. But again, I don't know what the script above is actually being used for, so I cannot give accurate suggestions. Know what I mean? Link to comment Share on other sites More sharing options...
Recommended Posts