Jump to content

Questions - Furniture, active marker, interact points, playing different animations on custom key press


Recommended Posts

Hi everyone, today im back to working on my power armor mod, and im a bit stuck for info.

 

Im trying to set up additional buttons and ways to activate the power armor, im looking for Hold A, Hold X, and press Y, I can detect the key presses and holds and start to do things with that in a script (attached to the power armor) ((Thankyou again DieFeM)) and I have given my power armor funiture another active marker interact point and told it to use the keyword "animFurnVaultConsoleActivate" but i cant figure out how to get a key press (say Hold X) to activate my new Active Marker interact point.

 

What im trying to achieve - you know that animation that plays when you open vault 111 for the first time, the one where you connect the pipboy to the console and look at the pipboy - im trying to get the player to do that animation when holding X (for example) on the power armor. - And then i want to get a custom menu to show on the pipboy for options concerning the power armor etc.

 

i have tried adding the "animFurnVaultConsoleActivate" keyword to the player, but thats not enough, so i disabled the normal activation of the power armor and temp removed the powerarmorfuniture keyword so the power armor cant be interacted with normally, but still, no animation plays and the player isnt using the new Active Marker interact point, instead the X-Transfer pop up button disapears - so not what i wanted.

 

This is the test script ive been trying... its a stripped down version of the play battery insert animation.

Scriptname Modular_PA_Markers extends ObjectReference


Keyword Property VaultConsoleKW Auto
Keyword Property firstPersonKW Auto
Keyword Property PlayerPathToFurniture Auto
Keyword Property powerArmorFurnitureKW Auto

Float Property ShowDist = 128.0 Auto Const

furniture property frame auto

Float InsertFailTimeout = 16.0
Int InsertFailTimer = 12


Event ONInIt()
	RegisterForKey(279) ; Y button - Press = Storage,  Hold = Diagnostics
	RegisterForKey(278) ; X Button - Hold = Repair Menu
EndEvent

Event OnKeyUp(int keyCode, float time)
    If (keyCode == 279 && time > 2.0)
        Debug.Notification("Y Button Held - entering diagnostics")
	If GetDistance(Game.GetPlayer()) > ShowDist
	    Debug.Notification("too far away to activate")
    Else
        Self.BlockActivation(True)
            Debug.Notification("activating diagnostics")

	gotoState("DiagnosticsAnim")

	Game.GetPlayer().AddKeyword(VaultConsoleKW)
	Self.AddKeyword(firstPersonKW)
	Self.AddKeyword(PlayerPathToFurniture)
	Self.RemoveKeyword(powerArmorFurnitureKW)
	StartTimer(InsertFailTimeout, InsertFailTimer)
        EndIf
    EndIF
EndEvent

STATE DiagnosticsAnim
    Event OnTimer(int aiTimerID)
        if ( aiTimerID == InsertFailTimer )
	debug.Notification("Timed out while waiting for Diagnostics")
	FinishAnims()
	endIf
    EndEvent
EndState

Function FinishAnims()
    CancelTimer(InsertFailTimer)
	Game.GetPlayer().RemoveKeyword(VaultConsoleKW)
	RemoveKeyword(firstPersonKW)
	RemoveKeyword(PlayerPathToFurniture)
	Self.addKeyword(powerArmorFurnitureKW)
EndFunction


So, first i guess, does anyone know where my script is going wrong?

and secondly, how the hell do i play that animation at the new Active Marker interact point with the custom key press (Holding X for example)

 

((im wondering if i need to be placing an invisible VaultConsole furniture object at the power armor and activating that instead, but im not too sure how to do that either.

 

Any help, advice, info would be a huge help. :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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