Difference between revisions of "Fieldname"

From WolfWiki
Jump to: navigation, search
(Vec3_t is not an array of vectors, it is one. Rewrote the vec3_t explanation. And OMG! 2good you really need to work on your spelling.)
(lua-4 changes)
Line 84: Line 84:
 
<tr bgcolor='white'><td align=left>s.weapon</td><td align=center>integer</td><td align=center>RO </td></tr>
 
<tr bgcolor='white'><td align=left>s.weapon</td><td align=center>integer</td><td align=center>RO </td></tr>
 
<tr bgcolor='lightgrey'><td align=left>scriptName</td><td align=center>string</td><td align=center>RO </td></tr>
 
<tr bgcolor='lightgrey'><td align=left>scriptName</td><td align=center>string</td><td align=center>RO </td></tr>
<tr bgcolor='white'><td align=left>sess.damage_given</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='white'><td align=left>sess.damage_given</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='lightgrey'><td align=left>sess.damage_received</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='lightgrey'><td align=left>sess.damage_received</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='white'><td align=left>sess.deaths</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='white'><td align=left>sess.deaths</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='lightgrey'><td align=left>sess.game_points</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='lightgrey'><td align=left>sess.game_points</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='white'><td align=left>sess.gibs</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='white'><td align=left>sess.gibs</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='lightgrey'><td align=left>sess.kills</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='lightgrey'><td align=left>sess.kills</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='white'><td align=left>sess.muted</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='white'><td align=left>sess.muted</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='lightgrey'><td align=left>sess.referee</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='lightgrey'><td align=left>sess.referee</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='white'><td align=left>sess.rounds</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='white'><td align=left>sess.rounds</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='lightgrey'><td align=left>sess.semiadmin</td><td align=center>integer</td><td align=center>RO</td></tr>
+
<tr bgcolor='lightgrey'><td align=left>sess.semiadmin</td><td align=center>integer</td><td align=center>RW</td></tr>
<tr bgcolor='white'><td align=left>sess.spec_invite</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='white'><td align=left>sess.spec_invite</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='lightgrey'><td align=left>sess.spec_team</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='lightgrey'><td align=left>sess.spec_team</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='white'><td align=left>sess.suicides</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='white'><td align=left>sess.suicides</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='lightgrey'><td align=left>sess.team_damage</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='lightgrey'><td align=left>sess.team_damage</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='white'><td align=left>sess.team_kills</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='white'><td align=left>sess.team_kills</td><td align=center>integer</td><td align=center>RW </td></tr>
<tr bgcolor='lightgrey'><td align=left>sess.team_received</td><td align=center>integer</td><td align=center>RO </td></tr>
+
<tr bgcolor='lightgrey'><td align=left>sess.team_received</td><td align=center>integer</td><td align=center>RW </td></tr>
 
<tr bgcolor='white'><td align=left>spawnflags</td><td align=center>integer</td><td align=center>RO </td></tr>
 
<tr bgcolor='white'><td align=left>spawnflags</td><td align=center>integer</td><td align=center>RO </td></tr>
 
<tr bgcolor='lightgrey'><td align=left>spawnitem</td><td align=center>string</td><td align=center>RO </td></tr>
 
<tr bgcolor='lightgrey'><td align=left>spawnitem</td><td align=center>string</td><td align=center>RO </td></tr>

Revision as of 21:08, 16 November 2005

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

fieldtypeaccess
activatorentityRO
chainentityRW
classnamestringRW
closespeedfloatRW
countintegerRW
count2integerRW
damageintegerRW
deathTypeintegerRW
delayfloatRW
dl_attenintegerRW
dl_colorvec3RW
dl_shaderstringRO
dl_stylestringstringRO
durationfloatRW
end_sizeintegerRW
enemyentityRW
flagsintegerRO
harcfloatRW
healthintegerRW
inusebooleanRO
isPropbooleanRO
itemstringRW
keyintegerRW
messagestringRW
methodOfDeathintegerRW
mg42BaseEntintegerRW
missionLevelintegerRW
modelstringRO
model2stringRO
nextTrainentityRW
noise_indexintegerRW
originvec3RW
prevTrainentityRW
props_frame_stateintegerRO
r.absmaxvec3RO
r.absminvec3RO
r.bmodelbooleanRO
r.contentsintegerRW
r.currentAnglesvec3RW
r.currentOriginvec3RW
r.eventTimeintegerRW
r.linkcountintegerRO
r.linkedbooleanRO
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.effect1TimeintegerRW
s.effect2TimeintegerRW
s.effect3TimeintegerRW
s.frameintegerRW
s.groundEntityNumintegerRO
s.loopSoundintegerRW
s.modelindexintegerRW
s.modelindex2integerRW
s.numberintegerRO
s.onFireEndintegerRW
s.onFireStartintegerRW
s.postrajectoryRW
s.powerupsintegerRO
s.solidintegerRW
s.teamNumintegerRW
s.timeintegerRW
s.time2integerRW
s.weaponintegerRO
scriptNamestringRO
sess.damage_givenintegerRW
sess.damage_receivedintegerRW
sess.deathsintegerRW
sess.game_pointsintegerRW
sess.gibsintegerRW
sess.killsintegerRW
sess.mutedintegerRW
sess.refereeintegerRW
sess.roundsintegerRW
sess.semiadminintegerRW
sess.spec_inviteintegerRW
sess.spec_teamintegerRW
sess.suicidesintegerRW
sess.team_damageintegerRW
sess.team_killsintegerRW
sess.team_receivedintegerRW
spawnflagsintegerRO
spawnitemstringRO
speedfloatRW
splashDamageintegerRW
splashMethodOfDeathintegerRW
splashRadiusintegerRW
start_sizeintegerRW
tagNamestringRO
tagParententityRW
takedamagebooleanRW
tankLinkentityRW
targetstringRW
TargetAnglesvec3RW
TargetFlagintegerRO
targetnamestringRO
teamchainentityRW
teammasterentityRW
trackstringRO
varcfloatRW
waitfloatRW
waterlevelintegerRO
watertypeintegerRO

ET variable types:

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.
In etpro-lua a vector is a table containing 3 numbers. It can be accessed by doing:

tablevar = {}
tablevar = et.gentity_get() --a vec3 value
x = tablevar[1]
y = tablevar[2]
z = tablevar[3]