Difference between revisions of "GameMode"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Scylla
imported>Middas
Line 23: Line 23:
end
end
</pre>
</pre>
Note: This does not mean it will run all the time.  This means that it will run only after you have activated the object, spell or quest that this is tied to.


[[Category: Commands]]
[[Category: Commands]]

Revision as of 09:59, 20 April 2006

Script within the gamemode block will be run every frame while the game is in non-menu mode. Most scripts will use this block type exclusively.

Example:

;sample timer script 
scn myScript

float 	timer
short 	init

begin GameMode
	if init == 0 
		;set the timer value
		set timer to 25
		set init to 1
	else
		if timer > 0
			set timer to timer - getSecondsPassed
		else
			;code to execute after 25 seconds
		endif
	endif
end

Note: This does not mean it will run all the time. This means that it will run only after you have activated the object, spell or quest that this is tied to.