AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Check monster_turret (https://forums.alliedmods.net/showthread.php?t=295831)

DarthMan 04-05-2017 16:02

[HELP] Check monster_turret
 
Hello there. How can I check if a monster_turret is active?
I want to display a HUD message if the turret is active.
I've never seen a server to have this thing, so it would be cool to introduce it on my BM HL server, since I plan working on a map with turrets in the near future. Any help will be appreciated. Thanks!

gabuch2 04-07-2017 08:25

Re: [HELP] Check monster_turret
 
If the turrets activate automatically if the players are nearby you can use pev_enemy

DarthMan 04-07-2017 11:16

Re: [HELP] Check monster_turret
 
Quote:

Originally Posted by Shattered Heart Lynx (Post 2510048)
If the turrets activate automatically if the players are nearby you can use pev_enemy

Nope, basically I want to display a hud message no matter where the player is.
They will activate once the player will get closer to them.
I've been also thinking about making sentry gun and dispensers just like on TFC, but I don't rly know how good this is gonna fit with HL, also since they are colored and HL1 has no teams, only CS, DOD and TFC.

gabuch2 04-07-2017 11:28

Re: [HELP] Check monster_turret
 
You can extract the player's topcolor and bottomcolor values and put them into the sentry's pev_colormap value (so the Sentry Guns will take their owner's color palette) .

There should be a Ham function that gets called when when monster_turret (and mini, etc). You can try hooking Ham_CheckEnemy() and get an enemy player walk near the turret while it is deactivated.

DarthMan 04-07-2017 12:18

Re: [HELP] Check monster_turret
 
Quote:

Originally Posted by Shattered Heart Lynx (Post 2510090)
You can extract the player's topcolor and bottomcolor values and put them into the sentry's pev_colormap value (so the Sentry Guns will take their owner's color palette) .

There should be a Ham function that gets called when when monster_turret (and mini, etc). You can try hooking Ham_CheckEnemy() and get an enemy player walk near the turret while it is deactivated.

I see, thanks :)


All times are GMT -4. The time now is 18:02.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.