DOWNLOAD MODS
Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...
-
Posts
16 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Tutorials
Gallery
Store
Events
Posts posted by majistik
-
-
I have done it!
Thanks for the help anyway, WillieSea
Scriptname ABSoundBowQuest extends ReferenceAlias Weapon property GlassBowABRandom auto Weapon property DaedricBowABRandom auto Weapon property OrcishBowABRandom auto Weapon property EbonyBowabRandom auto Weapon property GlassBowAB auto Weapon property DaedricBowAB auto Weapon property OrcishBowAB auto Weapon property EbonyBowab auto Quest Property ABSoundBowQst Auto actor property selfRef auto Sound Property WPNABDRW Auto Weapon TempX Event OnInit() RegisterForAnimationEvent(selfRef, "arrowAttach") EndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName) if (akSource == selfRef) && (asEventName == "arrowAttach") TempX=Game.GetPlayer().GetEquippedWeapon() if (TempX == (GlassBowABRandom) || TempX == (EbonyBowabRandom) || TempX == (OrcishBowABRandom) || TempX == (DaedricBowABRandom) || TempX == (GlassBowAB) || TempX == (EbonyBowab) || TempX == (OrcishBowAB) || TempX == (DaedricBowAB)) WPNABDRW.play(selfRef) endIf endIf endEvent
-
The hkx file is an animation file, nothing I know anything about.
If you have code that knows when the bow is fired, why can't you just play the sound you want then and there?
Other than some lag time, it might be okay. That is why I said a script solution is not the best route to play bow sounds.
The sounds after the bow is being shoot is already changed, Its also possible to change that in the ck, the sounds before the shoot itself is the question
If you know where the sounds are, you could also use a hex editor on the hkx file, and change the name of the file its using to play the sound, as long as you place your sound in the same folder path, and use the same number of characters for the file name, it 'should' in theory work.
I dont have to use Hex editor i can also turn the hkx to XML and vice versa, the problem is if i change the sound there it will change it to all of the bows in the game (which is simillar to changing the sounds values in the ck or replacing the WAV files), I want it to happen on a specifig bow.. i cant let all of the bows in the game have angry birds sounds
Thanks for trying to help
Edit: i think i got the code working wait before you answer thanks
-
It depends on if the bow has an 'animation graph' that can be detected. Unfortunately, there is no way to tell what is on the animation graph.
But I suspect it would not work anyway, because weapons when equipped, become part of the player, they are no longer seperate objects.
I still feel it would be best to find where the sounds are in the mesh, and change them. But, I also suspect that they may be hard-coded to use nif material sounds, which you may not be able to change without changing the sound of all bows.
The sounds are in "bow_drawlight.hkx" i can clrearly see where the sounds are at this file is that helps?
I already made a code that run as a quest all the time to make my bow shoot random arrows, I can write it there for the player object aswell if i knew how to.
Thanks
-
I got it working
-
Well i have fixed the error with the array. Now the code is complied but it does nothing.
This is the only trace that is being called
Event OnEquipped(Actor akActor) Debug.Trace("The player equipped the random bow") EndEvent
all other traces even in OnInit() doesnt show up.. This code wait for event that is being called when the player fired a bow and equips the player arrows with random arrows from the inventory (from a list), Its also recalculate the random range and reset the array if an arrow have "0" count.Scriptname ABrandomArrow extends ObjectReference Weapon property GlassBowABRandom auto Ammo Property ABArrowBigGreenhead Auto Ammo Property ABArrowBlack Auto Ammo Property ABArrowBlackexp Auto Ammo Property ABArrowBlackexpbig Auto Ammo Property ABArrowblue Auto Ammo Property ABArrowGreen Auto Ammo Property ABArrowIce Auto Ammo Property ABArrowIceExpL Auto Ammo Property ABArrowIceExpS Auto Ammo Property ABArrowOrange Auto Ammo Property ABArrowOrangebaloon Auto Ammo Property ABArrowOrangebaloontimer Auto Ammo Property ABArrowRed Auto Ammo Property ABArrowSmallRed Auto Ammo Property ABArrowWhite Auto Ammo Property ABArrowYellow Auto Ammo Property ABArrowYellowfast Auto Ammo[] BirdsInInentoryArray int RandomX int NumOfBirdsNow string BirdsString EVENT OnInit() Debug.Trace("onint") NumOfBirdsNow = 0 BirdsInInentoryArray = new Ammo[18] EndEVENT int Function GetNowCountAB() NumOfBirdsNow = 0 if (Game.GetPlayer().GetItemCount(ABArrowBigGreenhead) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowBigGreenhead) endIf if (Game.GetPlayer().GetItemCount(ABArrowBlack) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowBlack) endIf if (Game.GetPlayer().GetItemCount(ABArrowBlackexp) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowBlackexp) endIf if (Game.GetPlayer().GetItemCount(ABArrowBlackexpbig) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowBlackexpbig) endIf if (Game.GetPlayer().GetItemCount(ABArrowblue) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowblue) endIf if (Game.GetPlayer().GetItemCount(ABArrowGreen) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowGreen) endIf if (Game.GetPlayer().GetItemCount(ABArrowIce) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowIce) endIf if (Game.GetPlayer().GetItemCount(ABArrowIceExpL) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowIceExpL) endIf if (Game.GetPlayer().GetItemCount(ABArrowIceExpS) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowIceExpS) endIf if (Game.GetPlayer().GetItemCount(ABArrowOrange) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowOrange) endIf if (Game.GetPlayer().GetItemCount(ABArrowOrangebaloon) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowOrangebaloon) endIf if (Game.GetPlayer().GetItemCount(ABArrowOrangebaloontimer) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowOrangebaloontimer) endIf if (Game.GetPlayer().GetItemCount(ABArrowRed) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowRed) endIf if (Game.GetPlayer().GetItemCount(ABArrowSmallRed) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowSmallRed) endIf if (Game.GetPlayer().GetItemCount(ABArrowWhite) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowWhite) endIf if (Game.GetPlayer().GetItemCount(ABArrowYellow) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowYellow) endIf if (Game.GetPlayer().GetItemCount(ABArrowYellowfast) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]=(ABArrowYellowfast) endIf return NumOfBirdsNow EndFunction Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing) if (akWeapon == GlassBowABRandom) Debug.Trace("The player fired a shot from my bow!") RandomX = Utility.RandomInt(0, NumOfBirdsNow)+1 if (Game.GetPlayer().GetItemCount(BirdsInInentoryArray[RandomX]) == 0) NumOfBirdsNow=GetNowCountAB() RandomX = Utility.RandomInt(0, NumOfBirdsNow)+1 endIf if (NumOfBirdsNow > 1) Game.GetPlayer().EquipItem(BirdsInInentoryArray[RandomX]) Debug.Trace("The player equipped a random arrow") endIf endIf endEvent Event OnEquipped(Actor akActor) Debug.Trace("The player equipped the random bow") EndEvent
I have also made a post on
http://forums.nexusm...ever-triggered/
Thanks
-
Dont answer yet i think i got it with
EVENT OnInit()
-
Is there a way to use
OnAnimationEvent \ RegisterForAnimationEvent for:
arrowAttach
bowAttackStart
BowDraw
bowDrawn
will it help this case?
-
Hi there,
Im new to papyrus scriptiing and i made my first script today
I get a compile error of:
\temp\ABrandomArrow.psc(7,32): no viable alternative at input 'new'
In the ck when i try to save it. Im new to skyrim scripting so i probably made some mistakes. My code is written in a new script i created and called "ABrandomArrow" and added it to a new bow called "GlassBowABRandom" This code wait for event that is being called when the player fired a bow and equips the player arrows with random arrows from the inventory (from a list), Its also recalculate the random range and reset the array if an arrow have "0" count.Scriptname ABrandomArrow extends ObjectReference Weapon property GlassBowABRandom auto int RandomX int NumOfBirdsNow = 0 string[] BirdsInInentoryArray = new string[18] Function GetNowCountAB() NumOfBirdsNow = 0 if (Game.GetPlayer().GetItemCount(ABArrowBigGreenhead) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowBigGreenhead" endIf if (Game.GetPlayer().GetItemCount(ABArrowBlack) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowBlack" endIf if (Game.GetPlayer().GetItemCount(ABArrowBlackexp) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowBlackexp" endIf if (Game.GetPlayer().GetItemCount(ABArrowBlackexpbig) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowBlackexpbig" endIf if (Game.GetPlayer().GetItemCount(ABArrowblue) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowblue" endIf if (Game.GetPlayer().GetItemCount(ABArrowGreen) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowGreen" endIf if (Game.GetPlayer().GetItemCount(ABArrowIce) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowIce" endIf if (Game.GetPlayer().GetItemCount(ABArrowIceExpL) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowIceExpL" endIf if (Game.GetPlayer().GetItemCount(ABArrowIceExpS) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowIceExpS" endIf if (Game.GetPlayer().GetItemCount(ABArrowOrange) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowOrange" endIf if (Game.GetPlayer().GetItemCount(ABArrowOrangebaloon) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowOrangebaloon" endIf if (Game.GetPlayer().GetItemCount(ABArrowOrangebaloontimer) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowOrangebaloontimer" endIf if (Game.GetPlayer().GetItemCount(ABArrowRed) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowRed" endIf if (Game.GetPlayer().GetItemCount(ABArrowSmallRed) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowSmallRed" endIf if (Game.GetPlayer().GetItemCount(ABArrowWhite) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowWhite" endIf if (Game.GetPlayer().GetItemCount(ABArrowYellow) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowYellow" endIf if (Game.GetPlayer().GetItemCount(ABArrowYellowfast) > 0) NumOfBirdsNow = NumOfBirdsNow+1 BirdsInInentoryArray[NumOfBirdsNow]="ABArrowYellowfast" endIf EndFunction Event OnPlayerBowShot(Weapon akWeapon, Ammo akAmmo, float afPower, bool abSunGazing) if (akWeapon == GlassBowABRandom) Debug.Trace("The player fired a shot from my bow!") RandomX = Utility.RandomInt(0, NumOfBirdsNow)+1 if (Game.GetPlayer().GetItemCount(BirdsInInentoryArray[RandomX]) == 0) NumOfBirdsNow=GetNowCountAB() RandomX = Utility.RandomInt(0, NumOfBirdsNow)+1 endIf if (NumOfBirdsNow > 1) Game.GetPlayer().EquipItem(BirdsInInentoryArray[RandomX]) Debug.Trace("The player equipped a random arrow") endIf endIf endEvent
-
Thanks for the replay.
Its odesnt seems that this is something for the CK, I already opened several topics. I already tried to change all of the sounds parameters in the ck for the bows and for the arrows. Its impossible to make a change for specific bow or arrow from the ck..
http://forums.nexusmods.com/index.php?/topic/664881-how-to-change-bow-sound/
http://forums.nexusmods.com/index.php?/topic/858509-changing-bow-stretching-sound/
http://forums.bethsoft.com/topic/1431588-changing-bow-stretching-sound/
Thanks!
-
Thanks for the replay. I asked in the "3D Craftworks" fourm but it seems they cannot help me.
I dont mind adding sounds in addition the default sounds.
Can you please tell me how to write it?
Thanks
-
Ok thanks for looking into in anyway
-
Hi,
Im opening this topic after I have been advised to ask it here aswell.
I want to change(or add) a new sound for the stretch of the bow OR the sound of taking the arrow from the back.
I want it to be done to a specific bow (or only for a specific arrow type).
Thanks for your help
-
Hi there,
I really want to change the sound of a (new)custom bow stretch or the sound of the arrow being taking from the back.
From my knowledge this is not something that is being done by simply chaning sounds in the CK (in contrast to after you shoot the arrow).
I have seen that the sound is configuted inside "bow_drawlight.hkx" but i dont know how to change it for a specific bow. I have seen in the weapon config in the ck that there is an option to add papyrus script maybe there is a way to add the sound there with "GetAnimationVariableInt" or "OnAnimationEvent" or something?
i know nothing little about this language :\
Thanks
Changing bow stretching sound
in 3D Craftworks
Posted
I have made it with a papyrus code you can see it in my angry birds mod