Using Variables

From COD Modding & Mapping Wiki
Revision as of 19:52, 15 October 2008 by Zeroy (talk | contribs) (New page: == Using Variables == Image:Nutshell.png Variables can be used in several ways, but in all cases they are used to store some data for the duration of the round. Variables come in ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Using Variables

Variables can be used in several ways, but in all cases they are used to store some data for the duration of the round. Variables come in different style, integer, floats, strings and booleans, there are also several different ways variables can be stored.

A simple variable is simply declared using

<variable> = ;

This variable can be used in the current function and any function that it is called to (using arguements, explained in section 1)

Variables can be global (which can be used in all threads without needing to be called) by using the

level.<variable> = 

or they can be assigned to entities individually

<entity>.<variable> =