Difference between revisions of "Built In Functions"

From QuakeQEWiki
Jump to navigation Jump to search
(Created page with "{| class="wikitable" |+ !number !name !return !brief |- |1 |makevectors |void |// sets v_forward, etc globals |- |2 |setorigin |void |set movetype and solid first |- |3 |setmodel |void | |- |4 |setsize |void | |- |6 |break |void | |- |7 |random |float |returns 0 - 1 |- |8 |sound |void | |- |9 |normalize |vector | |- |10 |error |void | |- |11 |objerror |void | |- |12 |vlen |float | |- |13 |vectoyaw |float | |- |14 |[spawn] |entity | |- |15 |remove |void | |- | | | | |}...")
 
Line 74: Line 74:
|remove
|remove
|void
|void
|
|-
|16
|traceline
|void
|
|-
|17
|checkclient
|entity
|// returns a client to look for
|-
|18
|find
|entity
|
|-
|19
|precache_sound
|string
|
|-
|20
|precache_model
|string
|
|-
|21
|stuffcmd
|void
|
|-
|22
|findradius
|entity
|
|-
|23
|bprint
|void
|
|-
|24
|sprint
|void
|
|-
|25
|dprint
|void
|
|-
|26
|ftos
|string
|
|-
|27
|vtos
|string
|returns a string representation of a vector
|-
|28
|coredump
|void
|// prints all edicts
|-
|29
|traceon
|void
|// turns statment trace on
|-
|30
|traceoff
|void
|
|-
|31
|eprint
|void
|// prints an entire edict
|-
|32
|walkmove
|float
|// returns TRUE or FALSE
|-
|33
|
|
|// #33 was removed
|-
|34
|droptofloor
|float
|// TRUE if landed on floor
|-
|35
|lightstyle
|void
|
|-
|36
|rint
|float
|// round to nearest int
|-
|37
|floor
|float
|// largest integer <= v
|-
|
|
|
|
|-
|
|
|
|
|-
|
|
|
|
|
|-
|-
Line 83: Line 208:




 
(float v) = #;
 
 
void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;
 
entity() checkclient = #17; // returns a client to look for
 
entity(entity start, .string fld, string match) find = #18;
 
string(string s) precache_sound = #19;
 
string(string s) precache_model = #20;
 
void(entity client, string s)stuffcmd = #21;
 
entity(vector org, float rad) findradius = #22;
 
void(string s) bprint = #23;
 
void(entity client, string s) sprint = #24;
 
void(string s) dprint = #25;
 
string(float f) ftos = #26;
 
string(vector v) vtos = #27;
 
void() coredump = #28; // prints all edicts
 
void() traceon = #29; // turns statment trace on
 
void() traceoff = #30;
 
void(entity e) eprint = #31; // prints an entire edict
 
float(float yaw, float dist) walkmove = #32; // returns TRUE or FALSE
 
// #33 was removed
 
float(optional float yaw, optional float dist) droptofloor= #34; // TRUE if landed on floor
 
void(float style, string value) lightstyle = #35;
 
float(float v) rint = #36; // round to nearest int
 
float(float v) floor = #37; // largest integer <= v


float(float v) ceil = #38; // smallest integer >= v
float(float v) ceil = #38; // smallest integer >= v

Revision as of 05:13, 24 March 2022

number name return brief
1 makevectors void // sets v_forward, etc globals
2 setorigin void set movetype and solid first
3 setmodel void
4 setsize void
6 break void
7 random float returns 0 - 1
8 sound void
9 normalize vector
10 error void
11 objerror void
12 vlen float
13 vectoyaw float
14 [spawn] entity
15 remove void
16 traceline void
17 checkclient entity // returns a client to look for
18 find entity
19 precache_sound string
20 precache_model string
21 stuffcmd void
22 findradius entity
23 bprint void
24 sprint void
25 dprint void
26 ftos string
27 vtos string returns a string representation of a vector
28 coredump void // prints all edicts
29 traceon void // turns statment trace on
30 traceoff void
31 eprint void // prints an entire edict
32 walkmove float // returns TRUE or FALSE
33 // #33 was removed
34 droptofloor float // TRUE if landed on floor
35 lightstyle void
36 rint float // round to nearest int
37 floor float // largest integer <= v


(float v) = #;

float(float v) ceil = #38; // smallest integer >= v

// #39 was removed

float(entity e) checkbottom = #40; // true if self is on ground

float(vector v) pointcontents = #41; // returns a CONTENT_*

// #42 was removed

float(float f) fabs = #43;

vector(entity e, float speed) aim = #44; // returns the shooting vector

float(string s) cvar = #45; // return cvar.value

void(string s) localcmd = #46; // put string into local que

entity(entity e) nextent = #47; // for looping through all ents

void(vector o, vector d, float color, float count) particle = #48;// start a particle effect

void() ChangeYaw = #49; // turn towards self.ideal_yaw

// #50 was removed

vector(vector v) vectoangles = #51;

void(float to, float f) WriteByte = #52;

void(float to, float f) WriteChar = #53;

void(float to, float f) WriteShort = #54;

void(float to, float f) WriteLong = #55;

void(float to, float f) WriteCoord = #56;

void(float to, float f) WriteAngle = #57;

void(float to, string s) WriteString = #58;

void(float to, entity s) WriteEntity = #59;

// void(float f) bWriteByte = #59;

// void(float f) bWriteChar = #60;

// void(float f) bWriteShort = #61;

// void(float f) bWriteLong = #62;

// void(float f) bWriteCoord = #63;

// void(float f) bWriteAngle = #64;

// void(string s) bWriteString = #65;

// void(entity e) bWriteEntity = #66;

void(float step) movetogoal = #67;

string(string s) precache_file = #68; // no effect except for -copy

void(entity e) makestatic = #69;

void(string s) changelevel = #70;

//#71 was removed

void(string var, string val) cvar_set = #72; // sets cvar.value

void(entity client, string s, optional string s1, optional string s2, optional string s3, optional string s4, optional string s5, optional string s6, optional string s7) centerprint = #73; // sprint, but in middle

void(vector pos, string samp, float vol, float atten) ambientsound = #74;

string(string s) precache_model2 = #75; // registered version only

string(string s) precache_sound2 = #76; // registered version only

string(string s) precache_file2 = #77; // registered version only

void(entity e) setspawnparms = #78; // set parm1... to the

void(entity killer, entity killee) finaleFinished = #79;

string(entity e, string key) localsound = #80;

void draw_point( vector point, float colormap, float lifetime, float depthtest ) = #81;

void draw_line( vector start, vector end, float colormap, float lifetime, float depthtest ) = #82;

void draw_arrow( vector start, vector end, float colormap, float size, float lifetime, float depthtest ) = #83;

void draw_ray( vector start, vector direction, float length, float colormap, float size, float lifetime, float depthtest ) = #84;

void draw_circle( vector origin, float radius, float colormap, float lifetime, float depthtest ) = #85;

void draw_bounds( vector min, vector max, float colormap, float lifetime, float depthtest ) = #86;

void draw_worldtext( string s, vector origin, float size, float lifetime, float depthtest ) = #87;

void draw_sphere( vector origin, float radius, float colormap, float lifetime, float depthtest ) = #88;

void draw_cylinder( vector origin, float halfHeight, float radius, float colormap, float lifetime, float depthtest ) = #89;

void (entity client, string s, ...) centerprint2 = #90;

void (string s,...) bprint2 = #91;

void (entity client, string s, ...) sprint2 = #92;

float(string extname) checkextension = #99;