Getting the Actor that the Player Hits

Questions specific to OpenMW-CS can be asked, and content development related topics can be discussed here
Post Reply
Holo74
Posts: 2
Joined: 08 Jul 2018, 09:18

Getting the Actor that the Player Hits

Post by Holo74 » 09 Jul 2018, 17:39

I posted in another section and was told I might find some help here. I am trying to create an item that when you wear it, it will give you a percent chance of paralyzing the enemy no matter what weapon you are wielding. I am unsure of how to cast the spell on the enemy when the player hits them. I was told that I could do a loop to test if the actor is the one that the player is hitting, but that seems like it would take quite a while to test all of the actors. It might be possible if we were to only test the actors in the current loaded cells. I don't know how to do something like that with my current skill though. Another idea is that we could use a small explosion spell right in front of the player when they swing their weapon. That also has some possible glitches, but it could work better performance wise. To do that though, I would need to know when the player swings their weapon. Does anyone know how to test for when the player tries to hit something? Thank you for your input, I am new to coding in openmw-cs.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest