Detecting "Ignite" state

A forum dedicated to chat about maps and the Source SDK for any Mod including tips and tutorials.
Post Reply
Ian_Suffix
Villun
Villun
User avatar
Posts: 742
Joined: Wed Aug 20, 2008 12:14 am
Location: Washington State

Games Played

Ville Awards

Detecting "Ignite" state

Post by Ian_Suffix » Fri Oct 24, 2008 5:37 pm

Hey, all. New question, one that heavily relates to my little shoutbox request for assistance in testing some entities.

The question is short, and the answer is fleeting: how does one detect if an !activator, the player nearest to an entity, is on FIAAAAH?

mr_s
Villun
Villun
Posts: 5102
Joined: Sat Dec 22, 2007 9:27 am

Ville Awards

Post by mr_s » Fri Oct 24, 2008 5:39 pm

[quote="Ian_Suffix";p="129559"]
Hey, all. New question, one that heavily relates to my little shoutbox request for assistance in testing some entities.

The question is short, and the answer is fleeting: how does one detect if an !activator, the player nearest to an entity, is on FIAAAAH?
[/quote]

what you on about?

Dog
Server Ops
Server Ops
User avatar
Posts: 14317
Joined: Sun Oct 15, 2006 12:12 am
Location: In the bath, having a good think....

Games Played

Ville Awards

Dog - RIP Stevo’s avatar
Loading…

Post by Dog » Fri Oct 24, 2008 5:44 pm

That's easy...

Code: Select all

		new playerstate = GetEntProp(client, Prop_Send, "m_nPlayerCond")
		if ((playerstate & (1 << 14)) != 0)
		{
			SetEntProp(client, Prop_Send, "m_nPlayerCond", (playerstate & (~(1 << 14))))
		}
Above code detects if a player is on fire, then extinguishes them....

:D

Oh wait, this is a mapping forum?
*Backs out slowly*
Image

mr_s
Villun
Villun
Posts: 5102
Joined: Sat Dec 22, 2007 9:27 am

Ville Awards

Post by mr_s » Fri Oct 24, 2008 6:06 pm

lawl@Dog.

is that C#?

Ian_Suffix
Villun
Villun
User avatar
Posts: 742
Joined: Wed Aug 20, 2008 12:14 am
Location: Washington State

Games Played

Ville Awards

Post by Ian_Suffix » Fri Oct 24, 2008 6:07 pm

I'm not against coding (I have VS2005 and am taking C++ classes after all), but would that be wrapped into the BSP or would that require modding the server? I don't want to make my map incompatible with default settings just because I want to add an environmental effect.

I am quite pleased by your prompt and sincere response, however. Despite the fact I have never made an entity before, that code snippet makes a fair amount of sense.
Last edited by Ian_Suffix on Sat Oct 25, 2008 12:31 am, edited 1 time in total.

Stevo
Everlasting Villun
Everlasting Villun
User avatar
Posts: 8753
Joined: Sun Oct 22, 2006 10:01 pm
Location: Orange County, CA
Minecraft name: StevoTVR
Uplay name: StevoTVR
Contact:

Games Played

Ville Awards

StevoTVR’s avatar
Loading…

Re: Detecting "Ignite" state

Post by Stevo » Fri Oct 24, 2008 7:50 pm

He was joking. That's SourcePawn, which is the language used to create SourceMod plugins. I'm pretty sure it's useless for mapping... :lol:

Ian_Suffix
Villun
Villun
User avatar
Posts: 742
Joined: Wed Aug 20, 2008 12:14 am
Location: Washington State

Games Played

Ville Awards

Post by Ian_Suffix » Sat Oct 25, 2008 12:30 am

Gyabo! Rats.

Any ideas involving filters and triggers? Or, as I asked before, can you make your own entities without changing anything server-side?

l3eeron
Retired Admin
Retired Admin
Posts: 9995
Joined: Mon Oct 23, 2006 10:51 am
Location: The surface of last scattering

Games Played

Ville Awards

<eVa>l3eeron’s avatar
Loading…

Post by l3eeron » Mon Oct 27, 2008 8:13 am

Sorry dude, no way to do this with hammer :(

Ian_Suffix
Villun
Villun
User avatar
Posts: 742
Joined: Wed Aug 20, 2008 12:14 am
Location: Washington State

Games Played

Ville Awards

Post by Ian_Suffix » Mon Oct 27, 2008 10:01 am

I see. Thanks for preventing me from wasting any more effort on this.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests