DarthJay Posted January 29, 2013 Share Posted January 29, 2013 Hey guys I have a problem I have a script that changes a global variable upon the effect finishing. But when the effect finishes the variable stays the same. Can anyone tell me what to add to make the Global variable reset lets say after 4 or 5 hours of game time. If anyone can help it would be appreciated.This is the Script: Scriptname test365 extends Activemagiceffect GlobalVariable Property ActiveVar autoWeather Property ActiveWeather Auto Event OnEffectFinish (Actor akTarget, Actor akCaster) ActiveWeather.SetActive(true) ActiveVar.SetValue(1)Endevent I tried adding: Game.GetRealHoursPlayed() if Game.GetRealHoursPlayed() == 5 ActiveVar.SetValue(0)Endif But nothing happened maybe because it was in the same event. Link to comment Share on other sites More sharing options...
SSSl4Yer Posted February 1, 2013 Share Posted February 1, 2013 (edited) 1) About GlobalVariable: try this ActiveVar.SetValue(1.0)or ActiveVar.SetValueInt(1)or make sure you have right GlobalVar attached in properties 2) About time: try to use this function instead: someFloat = Utility.GetCurrentGameTime()it returns the current game time in terms of "game days passed", 1.000000 = 24 hours 3) Please clarify when exactly you want to make reset? After certain/random period of time or "OnEffectFinished"? Edited February 1, 2013 by SSSl4Yer Link to comment Share on other sites More sharing options...
Recommended Posts