Question about Actor Scripts (specifically OnPlayerBowShot a

Post » Sat Mar 09, 2013 6:00 am

I was a Computer Science major in undergrad ('05) before going straight to law school and have been a practicing attorney ever since, so I am a bit rusty/dated on some of my programming and scripting knowledge. That being said, I have a few questions that may actually have pretty obvious answers, so please bear with me.

I noticed on the wiki that there is an event "OnPlayerBowShot" that is only called if the weapon is a bow. I found the event within the Actor script, but I cannot seem to understand why it only works with a bow. Is there another script or gamesetting that is defining "Weapon akWeapon" to only be a bow?

The reason I am asking is I want to create an event that will be called if the player attacks with a 1H weapon. Is this possible? Can I simply make a copy of "OnPlayerBowShot", call it "OnPlayer1HAttack", place it within the Actor script, and define it that the weapon must be a dagger, mace, sword, or waraxe?

Thanks in advance for any help on this.
User avatar
Matt Terry
 
Posts: 3453
Joined: Sun May 13, 2007 10:58 am

Post » Sat Mar 09, 2013 9:45 am

One does not simply such an event. You'll need something like SKSE for that
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Sat Mar 09, 2013 9:18 am

Are you saying that I cannot make new events or alter current ones without SKSE?
User avatar
Thomas LEON
 
Posts: 3420
Joined: Mon Nov 26, 2007 8:01 am

Post » Sat Mar 09, 2013 6:09 am

You can create as many events as you like, but you cannot create new native events without something like SKSE. Native events are ones, like http://www.creationkit.com/OnPlayerBowShot_-_Actor, which are called directly by the game engine. Any events you create can only be called from Papyrus.

Cipscis
User avatar
Lizbeth Ruiz
 
Posts: 3358
Joined: Fri Aug 24, 2007 1:35 pm

Post » Fri Mar 08, 2013 8:16 pm

So is it possible in any way to achieve what I am trying to do, ie. make the game run a script whenever the player attacks with a 1H weapon, without using SKSE? Could I possibly alter OnPlayerBowShot to check for different types of weapons?
User avatar
Emmi Coolahan
 
Posts: 3335
Joined: Wed Jan 24, 2007 9:14 pm

Post » Fri Mar 08, 2013 11:47 pm

No, you cannot create a new native event without creating something like SKSE. Your best bet is to look for some way to detect this with existing Papyrus functionality.

Cipscis
User avatar
jaideep singh
 
Posts: 3357
Joined: Sun Jul 08, 2007 8:45 pm


Return to V - Skyrim