Forum posts

Posted 7 years ago2017-01-24 05:35:40 UTC
in Need help. How to click things in order Post #333161
It's your basic CODE LOCK setup.
Search on this site, you should get a few examples.
Posted 7 years ago2017-01-21 23:15:09 UTC
in Prevent tripmines from blocking doors fr Post #333139
You can blame that on the longevity of Half-Life/GoldSrc games.
Seriously, 18+ years and still going strong.
Posted 7 years ago2017-01-20 23:56:34 UTC
in Prevent tripmines from blocking doors fr Post #333135
Tripmines and Sachels are grenades which are derived from the
CBaseMonster class, but they are NOT flagged as monsters (unlike
the snark gren), so a func_monsterclip will have no effect on them.

There is NO way (via mapping that is) to prevent a player from
tossing a satchel to block a door other than stripping them out
of the map. The same goes for tripmines.

You can give a door some damage value so it destroys the tripmine
when it's blocked by it, but, there is no guarantee that the door will
kill the tripmine before it's blocked by it and starts to open again.

BTW, you don't NEED a door to block a player from accessing
a certain area. You can use a trigger_hurt or env_beam/laser
setup with a button/lever etc. So a player can trigger the
button which disables the lasers/forcefield for a short time
and then it re-activates. Then they can toss all the satchels
and deploy all the tripmines they want to no avail.
Posted 7 years ago2016-12-25 23:33:33 UTC
in Prevent tripmines from blocking doors fr Post #332855
Simplest way: Modify the CBaseDoor::DoorTouch() function in doors.cpp
and have it remove the tripmine.
Posted 7 years ago2016-07-26 03:36:23 UTC
in coding for teamplay. Post #330960
You can download the Quake Team Fortress 2.5 Source code from here:
http://www.moddb.com/mods/team-fortress/downloads/team-fortress-25-source-code

Study the Teamplay elements in the code ( it's written in C not C++ ),
a lot of it was carried over into GoldSrc TFC. This should help you

As for blood color, when the Player chooses a team, set m_bloodColor
to whatever you like, assuming that you're using a CBasePlayer entity
for your player entities.
Posted 8 years ago2016-05-04 06:05:22 UTC
in Can someone write/give me a gauss event? Post #330033
If your mod is a singleplayer mod, you can get away with making
the effects server side, no client side effects whatsoever.
It's not recommended, but you can just do this server side.

If you're doing multiplayer, then you will have to do client side
prediction + effects and stuff.
Posted 8 years ago2016-05-03 02:27:05 UTC
in Can someone write/give me a gauss event? Post #330029
Is your laser weapon a single shot weapon like the TFC Railgun,
or a continuous fire weapon like the Egon Gun?
Posted 8 years ago2016-03-04 19:00:29 UTC
in Dumb Entity Game Post #329188
@Jessie
Third one is "fireanddie" trigger entity.
Vader+Luke = "scripted_sequence" entity.
Posted 8 years ago2015-12-09 06:56:11 UTC
in Creating a new pickup item Post #327708
The format of the client's hud.txt file (also for weapon files)is this:
<entry number>
<icon name> <size> <sprite file> <X co-ord> <Y co-ord> <width> <height>
The entry number tells the client DLL how many entries to read into
memory. So, if you add any more entries, you Must increment the current
number or it will not work.

sprite file is the naturally the sprite file that the icon is located
and to be read from. The .spr extension is not needed.

size is either 320 (for low resolutions) or 640 (for higher resolutions).
I believe that anything above 800x600 screen resolutions will use the 640 size.

The X and Y co-ordinates are plotted from the upper left hand corner of
the BMP file that the sprite is made from. The game reads the width
number of pixels from left to right, starting from the X co-ordinate.
It reads the height number of pixels from top to bottom starting
from the Y co-ordinate. Whatever is in that bounding box in the sprite
file will be displayed on the client's screen.
Posted 8 years ago2015-12-05 22:58:43 UTC
in func_tanklaser? Post #327673
If you mean the purple human bug zapper things, then you can easily figure
it out from the map's entity setup. Get the ZHLT Power Tools and use
ripent or Botman's BSP Tool and export the map's entity data.

The outside Zapper uses 7 entities. This is the basic setup:

Place an env_laser in your map, set its targetname KeyValue to
flower_1, set the damage anount for the laser and most
importantly; set the LaserTarget KeyValue to player
(not sure if this is necessary since tanks only target players).

Make a func_tanklaser below this, set its laserentity KeyValue
to flower_1, set its target KeyValue to tsound_1. Make the
tanklaser invisible. Set its spawnflags KeyValue bitmask
to 1 (start active), do not make it controllable.
Set its targetname KeyValue to f1_kill.

Place an ambient_generic below this. The order isn't important,
just make sure all these entity origins are in the same X-Y co-ordinates.
Select an appropriate firing sound to play.
Set its targetname KeyValue to tsound_1.

Make a func_breakable, and set it's health. It should be centered
approximately where the laser would be firing from and large enough
for the Player to target it with a weapon.
Set its target KeyValue to f1_kill.

Place an env_sprite on or near the origin of the func_breakable.
Set an appropriate explosion sprite for this entity.
Set its targetname KeyValue to f1_kill.

Place a light_spot entity directly above the tank group setup.
Set it's orientation so that it points downward.
Set its targetname KeyValue to f1_kill.

Place a light_spot entity directly below the tank group setup.
Set it's orientation so that it points upward.
Set its targetname KeyValue to f1_kill.

This is how it works: the func_tanklaser finds a target and fires,
triggering the ambient_generic to play it's firing sound. The
env_laser is triggered wich damages the Player with its beam.

The two light_spot entities are just there to highlight the Zapper.

When the Player destroys the func_breakable, it triggers the
func_tanklaser and light_spot entities, turning them off.
The env_sprite is also triggered, playing the explosion sprite.

Here is the entity dump for 1 of the Zappers in c4a1:Key/Value : classname/env_laser
Key/Value : angle/90
Key/Value : targetname/flower_1
Key/Value : renderfx/0
Key/Value : LaserTarget/player
Key/Value : renderamt/200
Key/Value : rendercolor/137 30 164
Key/Value : width/10
Key/Value : NoiseAmplitude/40
Key/Value : TextureScroll/35
Key/Value : framestart/0
Key/Value : damage/5
Key/Value : texture/sprites/lgtning.spr
Key/Value : origin/264 712 -20

Key/Value : classname/func_tanklaser
Key/Value : angle/90
Key/Value : spawnflags/3
Key/Value : yawrate/100
Key/Value : yawrange/360
Key/Value : yawtolerance/15
Key/Value : pitchrate/100
Key/Value : pitchrange/15
Key/Value : pitchtolerance/5
Key/Value : barrel/8
Key/Value : spritescale/.8
Key/Value : firerate/1
Key/Value : persistence/4
Key/Value : firespread/0
Key/Value : renderfx/0
Key/Value : rendermode/2
Key/Value : rendercolor/123 49 215
Key/Value : laserentity/flower_1
Key/Value : minRange/64
Key/Value : maxRange/420
Key/Value : barrely/0
Key/Value : barrelz/0
Key/Value : spriteflash/sprites/xflare1.spr
Key/Value : target/tsound_1
Key/Value : renderamt/0
Key/Value : targetname/f1_kill
Key/Value : origin/264 712 -41
Key/Value : model/*80

Key/Value : classname/ambient_generic
Key/Value : spawnflags/52
Key/Value : health/7
Key/Value : preset/0
Key/Value : volstart/0
Key/Value : fadein/0
Key/Value : fadeout/0
Key/Value : pitch/110
Key/Value : pitchstart/100
Key/Value : spinup/0
Key/Value : spindown/0
Key/Value : lfotype/0
Key/Value : lforate/0
Key/Value : lfomodpitch/0
Key/Value : lfomodvol/0
Key/Value : cspinup/0
Key/Value : message/debris/beamstart10.wav
Key/Value : targetname/tsound_1
Key/Value : origin/264 712 -46

Key/Value : classname/func_breakable
Key/Value : health/120
Key/Value : material/3
Key/Value : explosion/1
Key/Value : delay/0
Key/Value : spawnobject/0
Key/Value : explodemagnitude/0
Key/Value : renderfx/0
Key/Value : rendermode/0
Key/Value : renderamt/0
Key/Value : rendercolor/0 0 0
Key/Value : target/f1_kill
Key/Value : model/*84
Key/Value : classname/light_spot
Key/Value : _cone/32
Key/Value : _cone2/64
Key/Value : pitch/-90
Key/Value : _light/135 24 194 200
Key/Value : _sky/0
Key/Value : style/50
Key/Value : targetname/f1_kill
Key/Value : origin/264 712 -20

Key/Value : classname/light_spot
Key/Value : _cone/15
Key/Value : _cone2/20
Key/Value : pitch/90
Key/Value : _light/135 24 194 120
Key/Value : _sky/0
Key/Value : style/50
Key/Value : targetname/f1_kill
Key/Value : origin/264 712 -60

Key/Value : classname/env_sprite
Key/Value : spawnflags/2
Key/Value : renderfx/0
Key/Value : rendermode/5
Key/Value : renderamt/128
Key/Value : rendercolor/160 39 142
Key/Value : framerate/20.0
Key/Value : model/sprites/fexplo.spr
Key/Value : targetname/f1_kill
Key/Value : scale/.5
Key/Value : origin/264 712 -28
Posted 9 years ago2015-01-15 05:40:39 UTC
in How do I change the Max Ammo capacity? Post #323297
The Egon/Gluon Gun shares the same ammo (cells) and ammo capacity with the
Gauss Gun, so you have 2 options here; separate the ammo capacities for
each weapon or make one simple change and bump up the capacity for both.

Option 1 (change capacity for both):
Open weapons.h and change this line:
#define URANIUM_MAX_CARRY 100
to
#define URANIUM_MAX_CARRY 600
OR

Option 2 (change capacity for Egon alone):
Open weapons.h and find this line:
#define URANIUM_MAX_CARRY 100
Below it add this line:
#define EGON_MAX_CARRY 600
Now open egon.cpp and change this line in GetItemInfo():
p->iMaxAmmo1 = URANIUM_MAX_CARRY;
to
p->iMaxAmmo1 = EGON_MAX_CARRY;
Save your changes and recompile the Half-Life DLL and you're set.

EDIT (JAN-15-2015)

Ok, I just doublechecked and you will need to do some client-side coding
as well. The ammo count message that the server sends to the clients only
allow ammo counts that clamp to one byte (254 actually, Thanks VALVe).
You will need to modify the AmmoX user message in player.cpp
to take a short instead of a byte and modify the corresponding message
handler in ammo.cpp to read a short in the client DLL folder.
Posted 11 years ago2013-04-29 05:19:05 UTC
in Door with code lock Post #313379
He's not asking HOW to make a DOOR. He's asking how to make a button
password lock for a door, like in the CS map kz_wsp_marioland.

I believe this example map might help you:
http://twhl.info/vault.php?map=2550
Posted 12 years ago2012-04-19 03:00:15 UTC
in Problems with my mod (HL1) Post #305530
Check your PM Nevermelt.

As for the rest of you, a precache error like that only occurs if:
1. The model/sprite is missing.
OR
2. The path is wrong. The model/sprite is in the wrong folder or
there is a grammatical error in the path you typed.
Posted 12 years ago2012-04-18 08:57:56 UTC
in how to create a medic? Post #305482
Do not attempt this unless you are an experienced coder.

To create a combat Medic you would need to combine elements of
both the Barney combat code and the Scientist heal code. I can't
even begin to list the things you need to impliment a brand new
class like that.

Barney and Scientist entities are derived from the CTalkMonster
base class, all I can recommend is that you study the talkmonster.cpp,
barney.cpp and scientist.cpp SDK files long an hard until you
understand exactly how the AI works before you even try to attempt this.
Posted 12 years ago2012-04-18 08:26:12 UTC
in help fixing this code Post #305481
That code snippet you found is missing ONE important line of code.

CBaseMonster :: Killed() passes in an entvars pointer to the entity
that killed the monster, you need to convert that entvars pointer to
a CBasePlayer pointer first, then run the player validity checks.