Aller au contenu

Photo

How do I get a barrier to apply electrical damage when touched?


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
I have set up a barrier, and I want it to do electrical damage to anyone that touches it.

I know the events I use are EVENT_TYPE_PLACEABLE_COLLISION, EVENT_TYPE_ENTER, EVENT_TYPE_USE, but I can't figure out the damage part.

Do I use EffectDamage for that? It doesn't say who is getting the damage so that doesn't seem right, but I can't find any other functions that make sense. Looked in the wiki and can't find anything that seems relevant.

Thanks!

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
EffectDamage is just a constructor for the effect. Do an ApplyEffectOnObject to use that effect on the target and tie to an attacking object.

You can also use a VFX ID in the EffectDamage to simulate an electrical effect.