EddieTheEagle Posted December 10, 2016 Share Posted December 10, 2016 Is it possible to have a script that runs everytime a ingame hour has passed? I have tried a few things but i can't get it work at all. Link to comment Share on other sites More sharing options...
IronDusk33 Posted December 10, 2016 Share Posted December 10, 2016 You should probably use RegisterForUpdateGameTime and OnUpdateGameTime. Just read up on them on the wiki. Link to comment Share on other sites More sharing options...
EddieTheEagle Posted December 11, 2016 Author Share Posted December 11, 2016 (edited) Ow cool thanks it didn't work because the script was linked to another script which had the same thing in there but after 12 hours :smile: I didn't notice it before but it works now couldn't find the wiki pages aswell so thanks :smile: Event OnUpdateGameTime()int ReduceBloodPoints = Utility.RandomInt(150, 350)debug.notification(ReduceBloodPoints)If JVar_VampireBloodPoints > (ReduceBloodPoints)JVar_VampireBloodPoints -= (ReduceBloodPoints)debug.notification(JVar_VampireBloodPoints)EndIfEndEvent Function VampireFeed()JVar_VampireBloodPoints += 2500VampireTransformDecreaseISMD.applyCrossFade(2.0)utility.wait(2.0)imageSpaceModifier.removeCrossFade()Game.IncrementStat( "Necks Bitten" )VampireFeedMessage.Show()VampireStages()UnregisterforUpdateGameTime()RegisterForUpdateGameTime(1.0)EndFunction Edited December 11, 2016 by Icrusher Link to comment Share on other sites More sharing options...
Recommended Posts