I recently noticed this on my PW while testing; I have a number of Items that use a unique power script to cause damage. However, if these items are used to kill a creature, I am having trouble capturing the Item Possessor as the real Killer in order to give proper experience rewards any help with this would be appreciated.
No exp for kill
#1
Posté 19 juin 2014 - 04:38
#2
Posté 19 juin 2014 - 05:49
The scripts are run by the module. In order to have the player take credit the effects used for killing (damage, death) must be created by the PC. This can be done through AssignCommand() if the effect is fully declared only within this command. Otherwise create a function that handles damage and death and AssignCommand it.
#3
Posté 20 juin 2014 - 06:20
I'm still not sure what you mean by that.
Here is the script i'm using. Did you mean something like this?
#4
Posté 20 juin 2014 - 06:46
I'm still not sure what you mean by that.
Here is the script i'm using. Did you mean something like this?
void main(){object oPC;if ((GetObjectType(GetItemActivatedTarget())!=OBJECT_TYPE_CREATURE)){SendMessageToPC(GetItemActivator(), "Improper use of item!");return;}oPC = GetItemActivator();object oTarget;oTarget = GetItemActivatedTarget();effect eBeam = EffectBeam(VFX_BEAM_FIRE,oPC,BODY_NODE_HAND,FALSE);effect eDMG = EffectDamage(3 ,DAMAGE_TYPE_FIRE);ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eBeam,oTarget,1.0);ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(474),oTarget,3.0);AssignCommand(oPC,ApplyEffectToObject(DURATION_TYPE_INSTANT,eDMG,oTarget,0.0));}
That still has the damaging effect being created by the module. The module is the object that is running the script. So you need the Damaging effect to be created after it is assigned to the PC.





Retour en haut






