Difference between revisions of "Delay"

From NexusWiki
Jump to: navigation, search
(Created page with '<big>'''Delay''' ''(_UID, time, command, variable_set);''</big> :The ’command’ is carried out after ’time’ seconds. If possible, don’t use this for delay in state-mach...')
 
 
Line 2: Line 2:
  
 
:The ’command’ is carried out after ’time’ seconds. If possible, don’t use this for delay in state-machine, rather make a temporary state, in which the delayed operation is done by its tick part (the delay can be given in the Tick), and it changes state immediately.
 
:The ’command’ is carried out after ’time’ seconds. If possible, don’t use this for delay in state-machine, rather make a temporary state, in which the delayed operation is done by its tick part (the delay can be given in the Tick), and it changes state immediately.
 +
 +
{{DelayWhenWarning}}
  
 
{{ScriptStructureCommands}}
 
{{ScriptStructureCommands}}
  
 
[[Category:Script structure commands]]
 
[[Category:Script structure commands]]

Latest revision as of 03:37, 12 June 2009

Delay (_UID, time, command, variable_set);

The ’command’ is carried out after ’time’ seconds. If possible, don’t use this for delay in state-machine, rather make a temporary state, in which the delayed operation is done by its tick part (the delay can be given in the Tick), and it changes state immediately.

In the Delay and When functions (because of technical reasons) the unique identifier must be given (’_UID’, arbitrary string) that can occur only once in a ruleset. If you tried to use it several times, than the reader will signal error. It is recommendable to start the ’_UID’ arbitrary string with a ’_’ character, because this will make it easier to read in the debug text. You can write 0 instead of UID, then the identifier will be generated automatically. You can only give an identifier this way, if there might be a chance that the event has to be stopped early (with ClearTimer), WHICH MEANS NEVER, or if you want to make the event easily findable, from debug point of view.

Script structure commands


Structure
Choose - ChooseFirst - Delay - If - IsValid - When - While

Variable manager
Ceil - Cos - Exp - Floor - Log - Max - Min - Not - Pow - Rnd - Round - Sin - Sqrt - Col - CHeat - CPlanck - CInv - CAdd - CAdda - CMul - CLerp - CBrig - CEqu - GetVal - IsName - Rot - V2Rot - R2Vec - Requ - RNull - SLen - SCat - SSub - SNum - SNumPad - SCmp - SiCmp - Set - SetVal - XfIdent - XfTran - XfRotX - XfRotY - XfRotZ - XfRot - XfScale - XfInv - XfTran - XfMul - Vec - VNull - VRandomOrth - VLen - VSqLen - VNorm - VNeg - VAdd - VSub - VMul - VDot - VCross - VEqu - VXform

Selection
AddItem - AddList - AllNum - Copy - CopyIf - DeleteSelect - Deselect - Dim - Empty - ExecList - obj:Colony - FindUnder - FirstNotScanned - GetFreeSel - GetN - IndexOf - InSelection - MaxList - NumOf - Pick - PickFirst - PickMax - PickN - RemoveFirst - RemoveItem - Select - SelectBoats - SelectDevices - SelectEx - SelectShips - SelWeightMul - SetN -SubList

Event handling
Call - ClearTimer - Disable - Enable - EventEx - LocalEvent - MEvent - PEvent - Return - RootEvent - Timer - StartTimer - UCall - UEvent - UTimer - EnableGUIEvents - RequestFiredEvent - obj:tRequestCriticalDamageEvent - obj:tRequestDetectionEvent - obj:tRequestEnergyOnMax - obj:tRequestNoShipsInRangeEvent - obj:tRequestOverforceEvent - obj:tRequestShipInRangeEvent

Statemachine
ChangeState - ChangeTick - GetMachine - IsInState - LeaveState

Multiplay
MpGameOver - MpGetPlayer - MpGetPlayerCount - MpGetPlayerKills - MpGetPlayerGain - MpGetTeamKills - MpGetTeamGain - MpGetTeamRace - MpGetWinningCondition - MpGetWinningConditionParam - MpHoldPrepare - MpHoldPrepare - MpIsIndividual - MpIsPlayerValid - MpEnableJumpIn - MpEnableJumpOut - MpSetDead - MpSetTeamGain - MpSetPlayerGain - MpSetWinnerTeam - MpSetWinnerPlayer - MpSpawnPoint - SetSceneRadius


- view all commands -