Jump to content

Scripting: How to hook into this event?


BigBizkit

Recommended Posts

I didnt saw it on BigBizkits code and it never came to mind. Srsly?! Im staling at the little things! -.- So sorry for my incompetence leading to humongous posts. -.-
I knew it was a string, but didnt think that quotes are mandatory, but now im getting the flash back how for instance, i didnt use quotes on RegisterForKey but did on RegisterForControl. Your awesome dude! xD

Link to comment
Share on other sites

Well, heres my currently working test code as separate but can be if elseif instead. Its a test for me so it doesnt matter.

 

Scriptname AnimDetTestScript extends Quest

Actor PlayerRef

 

Event OnInit()
PlayerRef = Game.GetPlayer()

RegisterForAnimationEvent(PlayerRef, "JumpUp") ;jump
RegisterForAnimationEvent(PlayerRef, "JumpFall") ;fall
RegisterForAnimationEvent(PlayerRef, "JumpDown") ;touchdown

Debug.Notification("Anim detect script initialized.")

EndEvent

 

Event OnAnimationEvent(ObjectReference akActor, string akEventName)
if akActor == PlayerRef && akEventName == "JumpUp"
Debug.Notification("AnimDetScr: Wheeee! [JUMPED]")
endif
if akActor == PlayerRef && akEventName == "JumpFall"
Debug.Notification("AnimDetScr: Oh s*it! [FALLING]")
endif
if akActor == PlayerRef && akEventName == "JumpDown"
Debug.Notification("AnimDetScr: OUCH! [TOUCHDOWN]")
endif
EndEvent

 

In case it could help anyone.

EDIT:
I make a separate and active quest and script to check the base functionality. Keeping it as simple as possible to see what and how and why. So, this works, you can perhaps start from there? its a new quest, only thing it has ticked at the Quest Data is the StartGameEnabled check box. Everything else is not touched when creating new quest.

 

And also, the thing i loved from FO3 and FONV and sticked to Skyrim is that i make those mods that dont rely on any internal information non Skyrim.esm dependant. If CK crashes, i load it in a second. >:D

And keep it that way until i need an internal record. Like armor and bipeds needs Skyrim.esm master loaded. Changing settings in the plugin or even a fully functional script can work without ever needing skyrim.esm or any other master.

The thing is, in FO, you could make an armor, set it up, make the bipeds, never loading FO.esm and it worked. But now, all the records aside from settings are now pulled from skyrim.esm. But it still works when not needing those other internal records.

Edited by theimmersion
Link to comment
Share on other sites

My guess is that the vanilla script stored the string identifier in a variable then.

Well yes, you are right, forgot about that.

 

I have been taking a break from editing what I wanted to edit because I realized "better vampires" counts combat feeding towards rank progression (which was my main concern) but not towards its "blood points" system (sorta important but I'll manage without).

 

Also, I am a bit frustrated because everything vampire related is coded in such an incomprehensible way.

 

The way I see it I would have to call the registerforanimationevents function e.g. in a quest script with an "OnInit" event?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...