Aller au contenu

Photo

Custom OnHit effect for weapons


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

#1
thebigMuh

thebigMuh
  • Members
  • 98 messages
Howdy!

I've done quite some research on how to apply a custom OnHit effect to a weapon of mine, and the only reasonable way I've been able to find so far is to override the EVENT_TYPE_ITEM_ONHIT event using an engineevents M2DA, and then handling the event in my own script and passing it to rule_core once I'm done with it.

This works fine, but I guess it breaks spectacularly as soon as another mod also overrides the same event.

Therefore, my question: Is there any better/simpler way to create new and unique OnHit properties for a weapon?

Ciao, muh!

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
You could try using the Event Manager to do your event EVENT_TYPE_ITEM_ONHIT override and specify your code to run before the original game's code. If that works, you should be set since you shouldn't have to worry about anyone else overriding the same event (your code will always fire)