Compile time error or game crashes?
If the game crashes when playing the sound, you gotta precache the sound in ClientPrecache().
PlaySound()
, if I remember correctly, you can find examples of its usage in ev_hldm.cppEngineClientCmd( "impulse 102" )
. Dunno if it's gonna exactly work, but it could be worth a try.CLIENT_PRINTF
part and the sound emitting part both on the clientside, unless you really need it on the serverside.EngineClientCmd( "showhudsrv" )
, and in the ClientCommands function in client.cpp, add an else if
line where you'll compare pcmd
to "showhudsrv"
, and inside of that, you're gonna change the player's pev->impulse
to 102. "Remember, it is not so much detailed except in the ass"So that's how the rear end of a ship is called.
bind x firemode
, and then you press that key, it will send a client command, which will go from the client to the serverside.pcmd
is the string, which you are gonna compare, for example if pcmd's contents are equal to "firemode"."Oh, I agree. I'm not trying to shoot you down."I understand, I was just letting you know that this isn't stuff I'd usually produce, since I gotta do this stuff SUPER FAST to get everything done in time. But of course, it leads to abominations at certain times.
else if ( m_pCvarDrawEntities->value == 5 )
{
IEngineStudio.StudioDrawAbsBBox();
}
There we go. :3pev->origin - pev->mins
to pev->origin + pev->absmax
, but sometimes it will differ from the actual collision box you get. Still a pretty good approximation. I'll find the time later today to grab the exact code.STATIC_BOXSadly, GoldSrc doesn't support that. You can't have custom collision meshes inside the MDL file. And besides, pev->solid can only have the following values:
SOLID_NONE
, SOLID_BBOX
, SOLID_TRIGGER
, SOLID_BSP
.Ohhh I don't know before if I used Quake Engine with obj files as "Spawnflag" "2" into collision / clip solid brush.Well, Quake is still a bit different than GoldSrc, so...
I imagine about nice prop models for Goldsource Engine. like you create bridge what do you should make sure for hitbox / collision?A bridge? Well, it depends.
Do you assign 3 or more static mesh like Source Engine / Portal prop models?No, it is a single MDL file for one entity.
$flags 512
must be turned on, and your model must have a hitbox at least.pev->solid
must be SOLID_BBOX
pev->movetype
can be anything in theory. Guaranteed to work are MOVETYPE_NONE
, MOVETYPE_FLY
, MOVETYPE_TOSS
and MOVETYPE_PUSHSTEP
. UTIL_SetSize
must be called in Spawn(). If your entity will perform thinking, then also call UTIL_SetSize
inside Think().SetObjectCollisionBox()
function in your entity if it moves dynamically. Maybe.btw how long do you think until someone will create a non vr version mod ? XDMy speculation is, less than 4 months after the SDK releases, if they provide one.
They should release games more oftenThey should totally make games more often, since they're still good at it.
typedef struct entvars_s
{
string_t classname;
string_t globalname;
vec3_t origin;
vec3_t oldorigin;
vec3_t velocity;
vec3_t basevelocity;
vec3_t clbasevelocity; // Base velocity that was passed in to server physics so
// client can predict conveyors correctly. Server zeroes it, so we need to store here, too.
vec3_t movedir;
vec3_t angles; // Model angles
vec3_t avelocity; // angle velocity (degrees per second)
vec3_t punchangle; // auto-decaying view angle adjustment
vec3_t v_angle; // Viewing angle (player only)
// For parametric entities
vec3_t endpos;
vec3_t startpos;
float impacttime;
float starttime;
int fixangle; // 0:nothing, 1:force view angles, 2:add avelocity
float idealpitch;
float pitch_speed;
float ideal_yaw;
float yaw_speed;
int modelindex;
string_t model;
int viewmodel; // player's viewmodel
int weaponmodel; // what other players see
vec3_t absmin; // BB max translated to world coord
vec3_t absmax; // BB max translated to world coord
vec3_t mins; // local BB min
vec3_t maxs; // local BB max
vec3_t size; // maxs - mins
float ltime;
float nextthink;
int movetype;
int solid;
int skin;
int body; // sub-model selection for studiomodels
int effects;
float gravity; // % of "normal" gravity
float friction; // inverse elasticity of MOVETYPE_BOUNCE
int light_level;
int sequence; // animation sequence
int gaitsequence; // movement animation sequence for player (0 for none)
float frame; // % playback position in animation sequences (0..255)
float animtime; // world time when frame was set
float framerate; // animation playback rate (-8x to 8x)
byte controller[4]; // bone controller setting (0..255)
byte blending[2]; // blending amount between sub-sequences (0..255)
float scale; // sprite rendering scale (0..255)
int rendermode;
float renderamt;
vec3_t rendercolor;
int renderfx;
float health;
float frags;
int weapons; // bit mask for available weapons
float takedamage;
int deadflag;
vec3_t view_ofs; // eye position
int button;
int impulse;
edict_t *chain; // Entity pointer when linked into a linked list
edict_t *dmg_inflictor;
edict_t *enemy;
edict_t *aiment; // entity pointer when MOVETYPE_FOLLOW
edict_t *owner;
edict_t *groundentity;
int spawnflags;
int flags;
int colormap; // lowbyte topcolor, highbyte bottomcolor
int team;
float max_health;
float teleport_time;
float armortype;
float armorvalue;
int waterlevel;
int watertype;
string_t target;
string_t targetname;
string_t netname;
string_t message;
float dmg_take;
float dmg_save;
float dmg;
float dmgtime;
string_t noise;
string_t noise1;
string_t noise2;
string_t noise3;
float speed;
float air_finished;
float pain_finished;
float radsuit_finished;
edict_t *pContainingEntity;
int playerclass;
float maxspeed;
float fov;
int weaponanim;
int pushmsec;
int bInDuck;
int flTimeStepSound;
int flSwimTime;
int flDuckTime;
int iStepLeft;
float flFallVelocity;
int gamestate;
int oldbuttons;
int groupinfo;
// For mods
int iuser1;
int iuser2;
int iuser3;
int iuser4;
float fuser1;
float fuser2;
float fuser3;
float fuser4;
vec3_t vuser1;
vec3_t vuser2;
vec3_t vuser3;
vec3_t vuser4;
edict_t *euser1;
edict_t *euser2;
edict_t *euser3;
edict_t *euser4;
} entvars_t;
vec3_t -> string// For mods
shouldn't be included in FGDs."took me a about a day to find out how to do it."Same. When I started using 3ds Max 9 in 2015, it basically took me a day to get a texture up on a simple cube.
studio()
.@PointClass base(Target) studio() = env_something
model(string) : "Model"
should he changed to:model(studio) : "Model"