TheLackey Posted January 24, 2018 Share Posted January 24, 2018 Hi - looking to basically do a "hello world" that repeats at a random interval throughout the game.I have goofed around in the creation kit only a little bit, so I want to make sure I'm on the right track and not waste a lot of time. I assume I create a quest, make it Start Game Enabled, Run Once and attach a script to it.The script would use registerForSINGLEUpdate(random number), and an OnUpdate Event that would messagebox my "hello word", followed by another registerForSingleUpdate Let me know if that's the right way to go about this....thanks! Link to comment Share on other sites More sharing options...
Evangela Posted January 24, 2018 Share Posted January 24, 2018 Nah, because when the OnUpdate is called again, it wont be called anymore after that unless you use further logic: Bool bKeepUpdating = false Event OnInit() bKeepUpdating = true RegisterForSingleUpdate(1.0) EndEvent Event OnUpdate() if bKeepUpdating == true RegisterForSingleUpdate(1.0) endif EndEvent There is still a problem though, it'll never stop updating, so you'll need to limit it anyway: Int numOfUpdates = 0 Event OnInit() RegisterForSingleUpdate(1.0) EndEvent Event OnUpdate() numOfUpdates += 1 if numOfUpdates < 5 RegisterForSingleUpdate(1.0) endf EndEvent That's how I would approach it at least. Link to comment Share on other sites More sharing options...
TheLackey Posted January 24, 2018 Author Share Posted January 24, 2018 yes that is all working good...thanks Link to comment Share on other sites More sharing options...
Recommended Posts