logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
"EffectDamageResistance" question

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
Epitaffio



Joined: 13 Jul 2010
Posts: 29
Location: Italy

PostPosted: Mon Sep 20, 2010 16:42    Post subject: "EffectDamageResistance" question Reply with quote

Hi, i have a problem with this function. What i want to do is to create a system that reduce the damaged inflicted to a pc by the armor material.

I've had made a basic system based on the tag and activated by the onEquip event but i don't know how to make this effect to work, this is a snippet of my code:


if(iArmorResTagl > 0){
effect eArmorTagl = EffectDamageResistance(DAMAGE_TYPE_SLASHING, iArmorResTagl);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eArmorTagl, oPc);
}

if(iArmorResCont > 0){
effect eArmorCont = EffectDamageResistance(DAMAGE_TYPE_BLUDGEONING, iArmorResCont);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eArmorCont, oPc);
}

if(iArmorResPerf > 0){
effect eArmorPerf = EffectDamageResistance(DAMAGE_TYPE_PIERCING, iArmorResPerf);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eArmorPerf, oPc);
}


The EffectDamageResistance seems not to work because, it is just trying to combine the effect (though they are 3 different type of damage).

Any hint?


inb4: sorry for bad english Razz
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Mon Sep 20, 2010 21:53    Post subject: Reply with quote

Where do iArmorResTagl, iArmorResCont and iArmorResPerf come from and are you sure they're greater than 0?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Epitaffio



Joined: 13 Jul 2010
Posts: 29
Location: Italy

PostPosted: Tue Sep 21, 2010 11:19    Post subject: Reply with quote

My fault.. bad bracket.



Thank you all, anyway!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group