Jump to content

Help Needed to Understand Activate Text Override


Recommended Posts

It's a new day with a new CK problem. Maybe someone here has solved it before.

I am trying to overwrite the activate button text for a furniture item that is also a container. It shows two activate buttons in game: A: Enter and X: Transfer.

I want to overwrite the A: Enter so that it will be A: Feed.

 

I tried entering the text in CK for the activate overwrite on the furniture object and when that didn't work, I tried to script a solution using the command:

 

furnitureRef.SetActivateTextOverride(EatMessage)

 

EatMessage is a message in my ESP that has the word "Feed" in the title as well as in the message text.

It is defined in my script as:

 

Message Property EatMessage Auto

 

and I filled the script properties in CK for this furniture object, but this scripting method didn't work either.

 

Can anyone tell me where I went wrong?

 

Link to comment
Share on other sites

That is the route that I took. It works well and I have used it before for activators for milking. I am still hoping that someone can show me how the other activation text overrides work because my player character is getting a lot of perks.

 

In this case, I added a perk script so that the activation text override only happens when my character is hungry and the container has the right food items.

Link to comment
Share on other sites

I assume perks are the only way to affect the activation prompts of objects that aren't actually activator forms. I did some tests today and I can get this to work as expected for actual activators, like a button for example, but it doesn't work for containers. I haven't had time to test on furniture yet.

 

This is the script I used.

 

Scriptname TestActivatorScript extends ObjectReference

Message property thisMessage auto
Bool property isDoor auto

Event OnActivate(ObjectReference akActionRef)
    if akActionRef == Game.GetPlayer()
        if isDoor == false
            playAnimation("Open")
            SetActivateTextOverride(thisMessage)
        else
            SetActivateTextOverride(thisMessage)
        endif
    endif
    
EndEvent

Event OnOpen(ObjectReference akActionRef)
    if isDoor == True
        if akActionRef == Game.GetPlayer()
            SetActivateTextOverride(thisMessage)
        endif
    endif
EndEvent

(Activate for the button and to see if it runs for containers. OnOpen was for the container)

Edited by AnishaDawn
Link to comment
Share on other sites

That looks very promising. I learned about the script override from reading a script that used it for actors to replace the "Talk" button text with the actor's work type. I haven't tried it on anything beside actors and containers yet. Your experiment makes me want to try it on other types of objects but that will have to wait until I solve my flora problem.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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