Raised This Month: $ Target: $400
 0% 

Godmoding an entity?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 03-29-2008 , 11:56   Godmoding an entity?
Reply With Quote #1

Hey,
Do any of you know how to make an entity invincible?
I've tried
Code:
SetEntProp(Ent, Prop_Data, "m_fFlags", FL_GODMODE);
but it fails to work.

Full Code:

Code:
 
//NPC:
public Create_NPC(Float:Origin[3], String:Classname[32])
{
 //Create:
 new Ent = CreateEntityByName(Classname);
 //Key Values:
 DispatchKeyValue(Ent, "physdamagescale", "0.0");
 //Spawn & Send:
 DispatchSpawn(Ent);
 TeleportEntity(Ent, Origin, NULL_VECTOR, NULL_VECTOR);
 //Invincible:
 SetEntProp(Ent, Prop_Data, "m_fFlags", FL_GODMODE); 
}
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
V0gelz
Senior Member
Join Date: Jun 2004
Old 03-29-2008 , 12:22   Re: Godmoding an entity?
Reply With Quote #2

What about m_takedamage ?
SetEntProp(Ent, Prop_Data, "m_takedamage", 1 , 1);
this makes it invincible.
__________________

Last edited by V0gelz; 03-29-2008 at 12:27.
V0gelz is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 03-29-2008 , 12:51   Re: Godmoding an entity?
Reply With Quote #3

i think you should set m_takedamage value 0 not 1

Last edited by SAMURAI16; 03-29-2008 at 12:54.
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 03-29-2008 , 13:25   Re: Godmoding an entity?
Reply With Quote #4

Code:
// settings for m_takedamage
#define	DAMAGE_NO				0
#define DAMAGE_EVENTS_ONLY		1		// Call damage functions, but don't modify health
#define	DAMAGE_YES				2
#define	DAMAGE_AIM				3
It's 1, and thanks!
+karma

about to test
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
V0gelz
Senior Member
Join Date: Jun 2004
Old 03-31-2008 , 15:18   Re: Godmoding an entity?
Reply With Quote #5

No problem
__________________
V0gelz is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:52.


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