Aller au contenu

Photo

Help with script when PC attacks/hits Something


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Devling

Devling
  • Members
  • 15 messages

Hey everybody.

I am in need of a way to launch a script whenever a PC attacks something

 

I am trying to add some extra scripted damage whenever a PC attacks.

 

Therefore i am in need of a way to launch a script whenever a PC damages something or hits something.



#2
WhiZard

WhiZard
  • Members
  • 1 204 messages

You are confusing three different words: attack, hit, and damage.  The answer to your post would be with regards to which word you meant.  If it is attack, then you could have target creatures be dealt damage in their OnPhysicalAttacked Event.  If it is hit you could be using an on-hit cast spell property on either a PC weapon or the target armor/skin.  If you are looking for damage you would be considering the creature's OnDamaged Event.



#3
Devling

Devling
  • Members
  • 15 messages

The thing i need is a script which could:

make a foating text above the PCs head with the amount of damage the PC would do, if he meet the conditions. It should happen to everything he attacks(all NPCs), so an OnDamage hit on every single mob would be alot of work, is there any way to make this shorter?