Making a GameMode script run at second intervals

From the Oblivion ConstructionSet Wiki
Revision as of 12:53, 11 November 2006 by imported>BiteHandNIN
Jump to navigation Jump to search

This page explains how to make a non-quest GameMode script run once every second, or two seconds, or whatever.



ScriptName RunsEverySecondScript

float Timer
short FirstSecond

begin GameMode
if Timer > 2 || FirstSecond == 0
	set Timer to 0
	set FirstSecond to 1

	;Code

endif
set Timer to Timer + GetSecondsPassed
end



This page took far too many edits to get right. I found it hard at first to figure out, so I decided to post it.