Raised This Month: $ Target: $400
 0% 

Damage Type


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Menethil
Senior Member
Join Date: Aug 2011
Old 05-01-2012 , 03:25   Damage Type
Reply With Quote #1

What is the difference between

DAMAGE_AIM and DAMAGE_YES ,
the 3'rd paramter from set_pev(index,pev_takedamage, DAMAGE_)

I've searched in all constants , all inc's, wiki, nothing found.
Menethil is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-01-2012 , 04:03   Re: Damage Type
Reply With Quote #2

Google found this for Quake. Many things from quake carried over but I don't know for sure on this one.

http://www.inside3d.com/showtutorial.php?id=192
Quote:
The difference between DAMAGE_YES and DAMAGE_AIM is, if an entity takedamage is DAMAGE_AIM, a grenade will explode when touching it, if the entity takedamage is DAMAGE_YES, a grenade won't explode when touching it, it just bounces off.
I also found them in HLSDK but I was unable to interpret what they actually do in there. I also see it used a lot for God Mode (if you search the forums . . .).
__________________

Last edited by fysiks; 05-01-2012 at 04:04.
fysiks is offline
Menethil
Senior Member
Join Date: Aug 2011
Old 05-01-2012 , 04:58   Re: Damage Type
Reply With Quote #3

I saw the use of these, but i was unable too to understund what is the difference between them

so if you set DAMAGE_NO, the reverse , and normal would be DAMAGE_YES , right?
Menethil is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-01-2012 , 09:25   Re: Damage Type
Reply With Quote #4

Make a test plugin that outputs your current damage type, and go test to see what your damage type is.
Then you will know what is default for players, and probably the rest of the entities that take damage.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-01-2012 , 09:27   Re: Damage Type
Reply With Quote #5

Set 2.0 value for default.
Set 0.0 value for disable damage from being taken.

Is DAMAGE_AIM defined as 2.0? I think so.

Here's fun.cpp

PHP Code:
 static cell AMX_NATIVE_CALL set_user_godmode(AMX *amxcell *params// set_user_godmode(index, godmode = 0); = 2 params
{
    
/* Sets player godmode. If you want to disable godmode set only first parameter. */
     // params[1] = index
      // params[2] = godmode = 0
   
       // Check index.
       
CHECK_PLAYER(params[1]);
   
       
// Get player pointer.
       
edict_t *pPlayer MF_GetPlayerEdict(params[1]);
    
       if (
params[2] == 1) {
           
// Enable godmode
           
pPlayer->v.takedamage 0.0;    // 0.0, the player doesn't seem to be able to get hurt.
       
}
        else {
           
// Disable godmode
            
pPlayer->v.takedamage 2.0;    // 2.0 seems to be standard value?
        
}
    
       return 
1;
    } 
__________________

Last edited by claudiuhks; 05-01-2012 at 09:31.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Reply


Thread Tools
Display Modes

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 07:53.


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