Forum posts

This post was made on a thread that has been deleted.
Posted 7 years ago2016-09-27 19:26:15 UTC
in Activating entities Post #331779
Remove the iMaxClip() != WEAPON_NOCLIP on ItemPostFrame, I had that issue with Para's sabre
Posted 7 years ago2016-09-27 15:11:47 UTC
in Activating entities Post #331776
First mistake: you are performing the "check if weapon is loaded/empty" code twice.

Second mistake: your check is incorrect, this:
if ( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] || m_pPlayer->m_rgAmmo[m_iSecondaryAmmoType] <= 100)
Means: IF primary ammo is something else than 0 OR secondary ammo <= 100.

Third: I don't understand why you use the primary/secondary ammo in reload. Unless you are making the weapon like the ones in Overwatch (infinite ammo but reload).

Fourth: Study this little example, adapt it to your needs:
void CTwohand::Reload( void )
{
// Don't reload if primary OR secondary ammo is equal or above 100
if ( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] >= 100 || m_pPlayer->m_rgAmmo[m_iSecondaryAttack] >= 100 )
return;

// The code below is executed if you have less than 100 primary AND secondary ammo, no need to do another if/else
CBaseEntity *pEntity = NULL;
// The "start entity" should be the player, not something else
while ((pEntity = UTIL_FindEntityInSphere( m_pPlayer, m_pPlayer->pev->origin, 10000.0f ) != NULL)
{
if ( FClassnameIs( pEntity->pev, "monstermaker" ) )
pEntity->Use( m_pPlayer, m_pPlayer, USE_ON, 0.0f ); // You specified the entity itself as the "caller" which is wrong, the player should be the activator AND the caller.
}
}
EDIT : Don't call me a lord just because I posted a quote from Linux's father, the idea behind this quote (I think you've found out already) is that when you have an issue with your code, the code itself is more appropriate to help rather than an explanation, it's like making a presentation with PowerPoint/Impress full of text with no images at all ^^
Posted 7 years ago2016-09-27 08:18:45 UTC
in Activating entities Post #331771
"Talk is cheap, show me the code" - Linus Torvalds.
Posted 7 years ago2016-09-27 08:16:34 UTC
in Post your screenshots! WIP thread Post #331770
A friendly advice: faking reflective surfaces/mirrors/specular is bad, winners uses true reflective surfaces/mirrors/specular ^^

The flashlight will kill everything ^^
Posted 7 years ago2016-09-25 19:42:09 UTC
in Post your screenshots! WIP thread Post #331759
Half-Maths: Dimensions ^^

@Loulimi : I think it also depends on the camera and rendering stuff for the horizontal line thingy.
Posted 7 years ago2016-09-19 17:04:55 UTC
in music issue Post #331729
Sounds to me like you used the wrong codec.

If you have VLC, play your music, right-click on it in the playlist, "Information about media" and in the "Codec" section you should have something similar to this:

Type: Audio
Codec: MPEG Audio layer 1/2 (mpga)
Channels: Stereo
Sample rate: 48000 Hz
Bitrate: 320 kbit/s

In all mods I worked on, their "gamestartup" is exactly like above. If you don't have something similar to above, then blame your audio software and/or the codec. I recommend GoldWave to work with sounds.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
Posted 7 years ago2016-09-14 19:40:21 UTC
in Post your screenshots! WIP thread Post #331677
Looks like there is a custom renderer or something (the light on the hand) ^^

I love the HUD, it's simple and it's clear.

I like the lighting as it is, I just have the feeling that the red light on the roof is a little bit weird.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
Posted 7 years ago2016-09-09 12:43:34 UTC
in What is love? Post #331612
Posted 7 years ago2016-08-31 08:58:32 UTC
in Post your screenshots! WIP thread Post #331489
MOOMINADE !

light
Posted 7 years ago2016-08-29 15:52:29 UTC
in [Code] For a NPC to play an animation Post #331466
Nope, it's the schedule, task, StartTask and RunTask
Posted 7 years ago2016-08-28 19:43:21 UTC
in [Code] For a NPC to play an animation Post #331456
Thank you Solokiller, I had some trouble getting to work at first but after a lot of tests I managed to get it working as it should. Here is the code for people who are interested:

[quote]Task_t tlMyNPCShield[] =
{
{ TASK_STOP_MOVING,					(float)0			},
{ TASK_PLAY_SEQUENCE_FACE_ENEMY,	(float)ACT_EXCITED	},
{ TASK_EAT,							(float)0			}
};

Schedule_t slMyNPCShield[] =
{
{
	tlMyNPCShield,
	ARRAYSIZE( tlMyNPCShield ),
	0,
	0,
	"MyNPC Shield"
},
};

Schedule_t *CMyNPC::GetSchedule( void )
{
switch ( m_MonsterState )
{
case MONSTERSTATE_COMBAT:
	if ( m_hEnemy != NULL && pev->health <= (gSkillData.zombieHealth / 2.0f) && gpGlobals->time > m_flNextShieldTime )
		return GetScheduleOfType( SCHED_COWER );
}
return CSquadMonster::GetSchedule();
}

Schedule_t *CMyNPC::GetScheduleOfType( int Type )
{
switch ( Type )
{
case SCHED_COWER:
	return slMyNPCShield;
	break;
}
return CSquadMonster::GetScheduleOfType( Type );
}

void CMyNPC::RunTask( Task_t *pTask )
{
switch ( pTask->iTask )
{
case TASK_EAT:
	TaskComplete();
	break;
default:
	CSquadMonster::RunTask( pTask );
	break;
}
}

void CMyNPC::StartTask( Task_t *pTask )
{
switch ( pTask->iTask )
{
case TASK_EAT:
	m_flNextShieldTime = gpGlobals->time + 15.0f;
	break;
default:
	CSquadMonster::StartTask( pTask );
	break;
}
}[/quote]
This post was made on a thread that has been deleted.
Posted 7 years ago2016-08-28 07:31:03 UTC
in [Code] For a NPC to play an animation Post #331443
Yes I tried with a schedule and a task, here is my attempt:

[quote]Task_t tlMyNPCShield[] =
{
{ TASK_STOP_MOVING,					(float)0			},
{ TASK_PLAY_SEQUENCE_FACE_ENEMY,	(float)ACT_EXCITED	},
{ TASK_WAIT,						(float)5.58f		}
};

Schedule_t slMyNPCShield[] =
{
{
	tlMyNPCShield,
	ARRAYSIZE( tlMyNPCShield ),
	0,
	0,
	"MyNPC Shield"
},
};[/quote]

I tried with your task and schedule and it doesn't work, he play the animation for 1 second (instead of the 5,58 seconds) and shoot at me again (or chase me).
This post was made on a thread that has been deleted.
Posted 7 years ago2016-08-27 20:40:52 UTC
in [Code] For a NPC to play an animation Post #331435
This problem has been haunting me for hours hence why I'm asking for help.

I have a NPC which is a clone of Barney except that it's hostile and has a shield (also it doesn't speak, meaning it's based on "CSquadMonster" instead of "CTalkMonster").

I have a "shield" animation linked to ACT_EXCITED, the NPC crouch, place it's shield, wait a bit then return to standing and aiming, that animation last for 5,58 seconds.

The shield itself works, the damage is blocked if you shoot it or spam your crowbar at it, the problem is below.

When I "force" the activity to ACT_EXCITED (in other words, I force the NPC to use it's shield), he use it for a second and start shooting at me again (or chase me). I want the NPC to keep shielding himself until he dies or the animation finished, how can I achieve that ?

Here is the code that forces the NPC to use it's shield (in the PrescheduleThink method)

m_IdealActivity = ACT_EXCITED;
m_flShieldTime = gpGlobals->time + 5.58f; // Shield for 5,58 seconds
m_flNextShieldTime = gpGlobals->time + 15.0f; // 15 seconds before using the shield again

In the GetSchedule method:

if ( m_Activity == ACT_EXCITED )
return &slMyNPCShield[ 0 ];
Thank you in advance for your help
Posted 7 years ago2016-08-24 18:28:21 UTC
in TWHL World - Community Project Post #331418
Urby's daughter is probably making a trollface right now xD
This post was made on a thread that has been deleted.
Posted 7 years ago2016-08-23 16:38:47 UTC
in vis noclip brush entity ? Post #331393
No you can't.
Posted 7 years ago2016-08-23 08:26:19 UTC
in TWHL World - Community Project Post #331388
I should also get to work on my entry. Maybe a stream from Urby will motivate me ^^

For people who recently joined the project, here is the "base" mod folder from Google Drive, it contains the "strict minimum" to run Spirit of Half-Life 1.8a1 with some TWHL Tower/World assets, just download and install into your Half-Life/Xash3D folder.
Download the "base TWHL World mod" folder (~11 Mb)

Here is the "TWHL World dev kit", those who had/have access to the Google Drive folder already got it but for those who just joined, it contains the latest VHLT compilers in both 32 bits/64 bits versions with it's required files, the Spirit of Half-Life 1.8a1 FGD is there.
Download the "TWHL World dev kit" (~1.2 Mb)

And finally, this is optional but here are the source files for the splash (or background) from Tetsu0 (again it comes from the Google Drive folder), it still say "TWHL Hub" and I think it would be better if someone changes it to "TWHL World" for consistency. I don't have Photoshop and aside from Paint, I don't master any other image software ^^
Download the "TWHL Hub splash source files" (~4.4 Mb)
This post was made on a thread that has been deleted.
Posted 7 years ago2016-08-22 10:45:56 UTC
in TWHL World - Community Project Post #331367
For the delay :
Don't worry, I don't expect Sept. 5th to be a hard deadline. It's something to shoot for but I expect we'll need more time to coordinate everything with the hub map. Keep working!
Can a map be random/phantasy made? (As in a fort-temple in the middle of the ocean)
I think your imagination and SoHL 1.8 are the only limits.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
Posted 7 years ago2016-08-20 21:08:20 UTC
in Now Gaming: ... Post #331329
Anyone else playing Overwatch? Archie and Scoots really suck at it and I wanna play! unhappy - :(
I play Overwatch sometimes with friends and I suck too ^^
Posted 7 years ago2016-08-20 21:06:09 UTC
in hammer editor entity angle problems Post #331328
This is a known issue within the original Hammer, the best thing would be manually update the values "Pitch Yaw Roll" in the entity's properties and press ENTER to validate.
Posted 7 years ago2016-08-20 20:56:48 UTC
in TWHL World - Community Project Post #331327
I had to abandon my first TWHL World entry because of Spirit 1.8 and start something else from scratch, so if you want to take the risk of breaking everyone maps, go ahead and update to SoHL 1.9.

Don't get me wrong, Spirit helped and still help a lot of modders, it gets the job done but seriously, what's the problem with SoHL and programmers ? There is like 2 or 3 differents "SoHL 1.9" made by different people, looking at the source code of one of them made me vomit and even burned my eyes.

Why don't programmers just give SoHL it's deserved rest instead of constantly trying to update it with more bugs and/or dirty code ? If you really want to revive/update Spirit, the first thing you should do is to recode properly every Spirit's feature, that "state" system for instance shouldn't have existed, the default system that Half-Life uses (USE_ON, USE_OFF and USE_TOGGLE) is more than enough (unless you are a crazy person that tries to reproduce Source's I/O system).

And before you say "Oh Shepard, if you are so angry on programmers that revive/update Spirit ? Why don't you do it yourself ?", my answer is "1) I don't have time because I have other projects. 2) If you are learning programming under Gold Source and/or want to 'polish' your skills, it's your chance. 3) I have no interest in updating SoHL."

UPDATE : To avoid any confusion, please note that this post's goal isn't to harm SoHL, it's usage within TWHL World, it's original author (Laurie Cheers) and/or anyone else related to people that create "unofficial" SoHL versions. I just wanted to be clear about those "Spirit 1.9" versions and said IMHO what would be the best for SoHL if a programmer has interest in it.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
Posted 7 years ago2016-08-04 08:52:54 UTC
in goldsrc studiomdl qc file error Post #331080
I have Win10 and I can compile/decompile models, both using "studiomdl.exe <QC>" and JHLMV.
Posted 7 years ago2016-08-04 08:50:57 UTC
in TWHL World - Community Project Post #331079
Still working on my entry, I don't know yet if it will be a "kill a target", " item to collect" or something else objective.