Fieldname: Difference between revisions

From WolfWiki
Jump to navigation Jump to search
m small fixors
added qboolean,meansOfDeath_t
Line 1: Line 1:
__NOEDITSECTION__
==Entity Fieldnames==
==Entity Fieldnames==
List of fields supported by [[ETPro:Lua Mod API#entities|et.gentity_get() and et.gentity_set()]] functions<br>
List of fields supported by [[ETPro:Lua Mod API#entities|et.gentity_get() and et.gentity_set()]] functions<br>
Line 180: Line 181:


==ET variable types==
==ET variable types==
===qboolean===
:a '''qboolean''' is a bool made of a number, it has 2 valeus 1 or 0
:0 is considered as false
:1 is considered as true


===vec3===
===vec3===
:a '''vec3''' is a 3-element array of numbers (C definition: typedef float vec3_t[3];). It is usually used to store and process coordinates in 3D space.<br>
:a '''vec3_t''' is a 3-element array of numbers (C definition: typedef float vec3_t[3];). It is usually used to store and process coordinates in 3D space.<br>
:In etpro-lua a vector is an array (table indexed by integers) containing 3 numbers. It can be accessed by
:In etpro-lua a vector is an array (table indexed by integers) containing 3 numbers. It can be accessed by
:doing:
:doing:
Line 228: Line 234:
:1023 is '''ENTITYNUM_NONE''' which is used instead of null in C under some circumstances to indicate no entity. This is needed where an entity number will be passed over the network.
:1023 is '''ENTITYNUM_NONE''' which is used instead of null in C under some circumstances to indicate no entity. This is needed where an entity number will be passed over the network.
:''Note'': Some other fields not listed as type 'entity' may take an entity number value. '''mg42BaseEnt''' and '''s.number''' are examples.<br>
:''Note'': Some other fields not listed as type 'entity' may take an entity number value. '''mg42BaseEnt''' and '''s.number''' are examples.<br>
===meansOfDeath===
:a '''meansOfDeath_t''' is a number indicating the [[etdamage|Method of Death]] Click  [[etdamage|here]] for a list whit posable value's


[[Category:ETPro]]
[[Category:ETPro]]
[[Category:ETPro:Mods]]
[[Category:ETPro:Mods]]

Revision as of 17:51, 8 March 2006

Entity Fieldnames

List of fields supported by et.gentity_get() and et.gentity_set() functions

fieldtypeaccess
activatorentityRO
chainentityRW
classnamestringRW
client.inactivityTimeintegerRW
client.inactivityWarningqbooleanRW
clipmaskinteger?
closespeedfloatRW
countintegerRW
count2integerRW
damageintegerRW
deathTypemeansOfDeath_tRW
delayfloatRW
dl_attenintegerRW
dl_colorvec3RW
dl_shaderstringRO
dl_stylestringstringRO
durationfloatRW
end_sizeintegerRW
enemyentityRW
flagsbitflagRO
harcfloatRW
healthintegerRW
inuseqbooleanRO
isPropqbooleanRO
itemstringRW
keyintegerRW
messagestringRW
methodOfDeathintegerRW
mg42BaseEntintegerRW
missionLevelintegerRW
modelstringRO
model2stringRO
nextTrainentityRW
noise_indexintegerRW
originvec3RW
pers.connectedconnected_t?
pers.netnamestring?
pers.localClientqboolean?
pers.initialSpawnqboolean?
pers.enterTimeinteger?
pers.connectTimeinteger?
pers.teamState.stateteamstatestate_t?
pers.voteCountinteger?
pers.teamVoteCountinteger?
pers.complaintsinteger?
pers.complaintClientinteger?
pers.complaintEndTimeinteger?
pers.lastReinforceTimeinteger?
pers.applicationClientinteger?
pers.applicationEndTimeinteger?
pers.invitationClientinteger?
pers.invitationEndTimeinteger?
pers.propositionClientinteger?
pers.propositionClient2integer?
pers.propositionEndTimeinteger?
pers.autofireteamEndTimeinteger?
pers.autofireteamCreateEndTimeinteger?
pers.autofireteamJoinEndTimeinteger?
pers.lastSpawnTimeinteger?
pers.readyqboolean?
prevTrainentityRW
props_frame_stateintegerRO
ps.statsinteger arrayRW
ps.persistantinteger arrayRW
ps.pinginteger?
ps.powerupsinteger arrayRW
ps.ammointeger arrayRW
ps.ammoclipinteger arrayRW
r.absmaxvec3RO
r.absminvec3RO
r.bmodelqbooleanRO
r.contentsintegerRW
r.currentAnglesvec3RW
r.currentOriginvec3RW
r.eventTimeintegerRW
r.linkcountintegerRO
r.linkedqbooleanRO
r.maxsvec3RW
r.minsvec3RW
r.ownerNumintegerRW
r.singleClientintegerRW
r.svFlagsintegerRW
r.worldflagsintegerRO
radiusintegerRW
randomfloatRW
rotatevec3RW
s.anglesvec3RW
s.angles2vec3RW
s.apostrajectoryRW
s.clientNumintegerRW
s.constantLightintegerRW
s.densityintegerRW
s.dl_intensityintegerRW
s.dmgFlagsintegerRW
s.eFlagsintegerRW
s.eTypeinteger?
s.effect1TimeintegerRW
s.effect2TimeintegerRW
s.effect3TimeintegerRW
s.frameintegerRW
s.groundEntityNumintegerRO
s.loopSoundintegerRW
s.modelindexintegerRW
s.modelindex2integerRW
s.numberintegerRO
s.onFireEndintegerRW
s.onFireStartintegerRW
s.originvec3?
s.origin2vec3?
s.postrajectoryRW
s.powerupsintegerRO
s.solidintegerRW
s.teamNumintegerRW
s.timeintegerRW
s.time2integerRW
s.weaponintegerRO
scriptNamestringRO
sess.sessionTeamteam_tRW
sess.spectatorTimeintegerRW
sess.spectatorStatespectatorState_tRW
sess.spectatorClientintegerRW
sess.latchSpectatorClientintegerRW
sess.playerTypeintegerRW
sess.playerWeaponintegerRW
sess.playerWeapon2integerRW
sess.spawnObjectiveIndexintegerRW
sess.latchPlayerTypeintegerRW
sess.latchPlayerWeaponintegerRW
sess.latchPlayerWeapon2integerRW
sess.damage_givenintegerRW
sess.damage_receivedintegerRW
sess.deathsintegerRW
sess.game_pointsintegerRW
sess.gibsintegerRW
sess.killsintegerRW
sess.medalsinteger arrayRW
sess.mutedqbooleanRW
sess.rankintegerRW
sess.refereeintegerRW
sess.roundsintegerRW
sess.semiadminintegerRW
sess.skillinteger arrayRW
sess.spec_inviteintegerRW
sess.spec_teamintegerRW
sess.suicidesintegerRW
sess.team_damageintegerRW
sess.team_killsintegerRW
sess.team_receivedintegerRW
sess.aWeaponStatsweapon_stat_tRW
spawnflagsintegerRO
spawnitemstringRO
speedfloatRW
splashDamageintegerRW
splashMethodOfDeathintegerRW
splashRadiusintegerRW
start_sizeintegerRW
tagNamestringRO
tagParententityRW
takedamagebooleanRW
tankLinkentityRW
targetstringRW
TargetAnglesvec3RW
TargetFlagintegerRO
targetnamestringRO
teamchainentityRW
teammasterentityRW
trackstringRO
varcfloatRW
waitfloatRW
waterlevelintegerRO
watertypeintegerRO
note: all the sess.* fields will return nil unless the entity is associated with client slot < sv_maxclients.
note: all array variables need tobe called or get whit an additional parameter

ET variable types

qboolean

a qboolean is a bool made of a number, it has 2 valeus 1 or 0
0 is considered as false
1 is considered as true

vec3

a vec3_t is a 3-element array of numbers (C definition: typedef float vec3_t[3];). It is usually used to store and process coordinates in 3D space.
In etpro-lua a vector is an array (table indexed by integers) containing 3 numbers. It can be accessed by
doing:
origin = et.gentity_get(entNum,"r.currentOrigin") --a vec3 value
x,y,z = origin[1],origin[2],origin[3]

trajectory

a trajectory is returned as a lua table described below
{
  trDuration = <number>, --- int
  trTime = <number>, -- int
  trType = <number>, -- see below for allowed values
  trBase = <vec3_t>, -- vec3, as described above
  trDelta = <vec3_t> -- also a vec3
}
the allowed values for trType (along with the enum names and original comments from the ET source), are as follows. Note
that not all values make sense for all entity types
numbertypediscription
1TR_STATIONARY 
2TR_INTERPOLATEnon-parametric, but interpolate between snapshots
3TR_LINEAR 
4TR_LINEAR_STOP 
5TR_LINEAR_STOP_BACKreverse movement can be different than forward
6TR_SINEvalue = base + sin( time / duration ) * delta
7TR_GRAVITY 
8TR_GRAVITY_LOW 
9TR_GRAVITY_FLOATsuper low grav with no gravity acceleration
10TR_GRAVITY_PAUSEDhas stopped, but trace to see if it should be switched back to TR_GRAVITY
11TR_ACCELERATE 
12TR_DECCELERATE 
13TR_SPLINE 
14TR_LINEAR_PATH 



entity

The fields listed as having type enitity return an entity number or nil. Entity numbers are integers from 0 through 1023. Some of the entity numbers have special meanings:
0 - (sv_privateclients - 1) are reserved for clients who connect with the private slot password
0 - 63 are reserved for clients. A client's entity number is also its client number (as shown by /players for example)
1022 is the worldspawn entity
1023 is ENTITYNUM_NONE which is used instead of null in C under some circumstances to indicate no entity. This is needed where an entity number will be passed over the network.
Note: Some other fields not listed as type 'entity' may take an entity number value. mg42BaseEnt and s.number are examples.

meansOfDeath

a meansOfDeath_t is a number indicating the Method of Death Click here for a list whit posable value's