1、pev变量说明Here is a list of every pev variable, their return type, and a description.Tested Value is printout of my entitys values on a quick test.Chart is not yet complete.#VariableSFITested ValueDescription0pev_string_startPlaceholder. Everything till pev_string_end are string variables.1pev_classnam
2、eplayerType of entity (Value of this controls what code handles the entitys think at pev_nextthink)2pev_globalnameThis is the name of the global variable (set by an env_global entity) that can be used to control the state of the entity.3pev_modelmodels/player/terror/terror.mdlThe model of the entity
3、4pev_targetEntity that this entity is handling5pev_targetnameThe name given to this entity that another entity searches for to handle it6pev_netnameGHW_ChronicPlayer or NPC name7pev_message?8pev_noiseNoise variables do different things for different ents.9pev_noise1This is the move sound for doors.1
4、0pev_noise2This is the stop sound for doors.11pev_noise312pev_string_endPlaceholder. End of string variables.13pev_edict_startPlaceholder. Start of edict variables.14pev_chain015pev_dmg_inflictor0The entity that dealt damage to this entity. (If a gun deals the damage the guns pev_owner is the entity
5、 who dealt the damage).16pev_enemy017pev_aiment0Contains the entitys index that this entity is following. This is only in effect if this ents movetype is MOVETYPE_FOLLOW.Example:set_pev(ent,pev_movetype,MOVETYPE_FOLLOW);set_pev(ent,pev_aiment,index);18pev_owner0Parent of this entity. For weapons thi
6、s entity is the player.19pev_groundentity020pev_euser1021pev_euser2022pev_euser3023pev_euser4024pev_edict_endPlaceholder. End of edict variables.25pev_float_startPlaceholder. Start of float variables.26pev_impacttime0.00000027pev_starttime0.00000028pev_idealpitch0.00000029pev_ideal_yaw0.00000030pev_
7、pitch_speed0.00000031pev_yaw_speed0.00000032pev_ltime0.00000033pev_nextthink0.000000The time (in relevance to get_gametime() of the next time this entitys think will be called.34pev_gravity1.0000000.0 = No gravity1.0 = Normal GravityValues are not limited to 0.0 through 1.035pev_friction1.0000000.0
8、= No Friction (0 Acceleration)1.0 = Normal Friction1.0 = Faster Acceleration + Faster Haltnegative value = Constant Acceleration in backwards direction36pev_frame158.772949The frame of the current sequence of the current model (Starts at frame 0.0)37pev_animtime7.223107The time to start the animatio
9、n of the sequence (if sequence is running this is set to get_gametime()38pev_framerate1.000000The frames per second (FPS) the current sequence is playing at39pev_scale0.000000Doesnt affect models. Used for such things as env_sprites (stores sprite scale) or env_shooter (stores gib size)40pev_rendera
10、mt0.000000The intensity of the render effects (0 = no effect 255 = full effect).Dont think the value of this matters when the render mode is kRenderNormal (0)41pev_health100.000000Health of the entity. When it reaches 0 it is destroyed.42pev_frags0.000000# of fragsScoreboard changes when the ScoreIn
11、fo message is called.43pev_takedamage2.000000Damage multiplyer0.0 = Invincible2.0 = Normal Damage44pev_max_health100.000000Always set to 100 but doesnt effect entities. I think it is just for reference. Players always respawn at 100.0 but I dont know if non-player entities spawn with this much HP wh
12、en DLL_Func_Spawn is called. will have to test.45pev_teleport_time0.000000? - Counts back from 2000.0 whenever I get out of the water (when the game moves your player upwards to represent climbing out).46pev_armortype0.000000Type of armor the entity has (In CS this is the CsArmorType constants).47pe
13、v_armorvalue0.000000Amount of armor the entity has.48pev_dmg_take0.000000Amount of damage entity was hit for.49pev_dmg_save0.00000050pev_dmg2.000000Damage type that this entity got hit by (DMG_ constants).51pev_dmgtime0.00000052pev_speed0.000000Not for players. Effects change from entity to entity (
14、IE: used for door swing speed)53pev_air_finished19.223108Default: get_gametime() + 12.0Number is set according to the previous equation every think unless a player is submerged under water.if(get_gametime()=pev_air_finished + x)Deal Damagewhere x is any positive integer including 0.54pev_pain_finish
15、ed0.000000? - Guess would be that this is set to a gametime when you are set on fire or something of the sort.55pev_radsuit_finished0.000000? - Guess would be that this is set to a gametime for how long the radiation suit lasts for maps like rock in TFC.56pev_maxspeed250.000000Think uses this to det
16、ermine the max speed a player or monster can move at when fully accelerated.57pev_fov90.000000Field of ViewDetermines how many degrees of view fit on the screen.Default for players: 90.0Smaller numbers are used for scoping.58pev_flFallVelocity0.000000velocity2 *= -1.0Opposite of Z velocity (Falling
17、Speed)59pev_fuser10.00000060pev_fuser20.000000In CS: When jump button is pressed this variable is set to 1320.0 and decreaments to 0.0. With default friction when this variable reads 0.0 the player should have the ability to accelerate like normal after landing from a jump. This variable does not af
18、fect this occurrence but monitors it.61pev_fuser30.00000062pev_fuser40.00000063pev_float_endPlaceholder. End of float variables.64pev_int_startPlaceholder. Start of integer variables65pev_fixangle0.000000When set to 1 it forces the client to update its angles to the ones set in pev_viewangles during
19、 the next player think66pev_modelindex156.000000Model index returned by precache_model.67pev_viewmodel187258336.000000Use pev_viewmodel268pev_weaponmodel187258352.000000Use pev_weaponmodel269pev_movetype3.000000Movement Type Constant. Further detail later70pev_solid3.000000Solid Type Constant.SOLID_
20、NOT = No clipping, No touching, No hitboxesSOLID_TRIGGER = No clipping, Touching, No hitboxesSOLID_BBOX = Clipping, Touching, HitboxesSOLID_SLIDEBOX = Clipping, Touching, Hitboxes, Friction when moving, Players and monsters use thisSOLID_BSP = No Clipping, Touching, Hitboxes71pev_skin0.000000Selects
21、 the skin the model displays. Most models only have 1 skin (skin 0).72pev_body1.000000Part of a model.pev_body = 1 shows backpack in CS73pev_effects0.00000074pev_light_level51.000000Amount of light shining on the entity (Used for model rendering) (0=No light 180=Fully Lit).75pev_sequence19.000000Pri
22、mary sequence the entity runsIf player or monster this is the sequence of the lower body parts (IE: run / sequence 4 in CS)76pev_gaitsequence1.000000Secondary sequence for monsters and players that shows upper body animation (IE: ref_aim_mp5 / sequence 36 in CS)77pev_rendermode0.000000The type of re
23、ndering for the model / how the model is rendered.78pev_renderfx0.000000The effects added to the model rendering.79pev_weapons-1610481664.00000080pev_deadflag0.000000Flags dealing with players death status0 - alive1 - dead2 - respawning81pev_button0.000000Bit flag for what buttons are currently bein
24、g held by the playerIN_ constants82pev_impulse0.000000When set it activates impulse commands during think (Resets to 0.0 after impulse occurs) (Impulses can be found in player.cpp).Non-Mod specific impulses:99 - Valve/Sierra Logo100 - Flashlight201 - Logo Spray83pev_spawnflags0.000000Bit flag of ent
25、itys spawn flags (SF_ constants (hlsdk_const.inc).84pev_flags520.000000bit flag of entity flags (FL_ constants)85pev_colormap1.00000086pev_team0.000000Team of the entity (Use mod specific team constants). I think it can only be extracted as an int which may be why it is displaying 0.0 on my reading
26、even though I was on the T team.87pev_waterlevel0.0000000 - Not in water1 - Waiding2 - Mostly submerged3 - Completely submerged88pev_watertype-1.000000-1 - No water-3 - Water-4 - Slim-5 - Lava89pev_playerclass0.000000Not used in CS.Class constant in other games (IE: DODC_GARAND / TFC_PC_SCOUT)90pev_
27、weaponanim1.000000Sequence of the v_ model.91pev_pushmsec0.00000092pev_bInDuck0.0000000 - Not in the process of ducking1 - In the process of duckingNote: if fully crouched this returns 093pev_flTimeStepSound260.000000? - Starts at 400.0 and decreases to 0.0 then resets to 400.0 and repeats constantly.94pev_flSwimTime0.000000?95pev_flDuckTime