F4llfield Posted April 3, 2023 Share Posted April 3, 2023 After a few hours of trying to find a way to get an actor's name, I'm here to ask for help. (Google is not my friend) I have and Actor array and I need to get the name of the actors. How can I get it? ActorsArray[0].GetName() doesn't work... Link to comment Share on other sites More sharing options...
Fantafaust Posted April 3, 2023 Share Posted April 3, 2023 You need to pass the result to something. Are you trying to show it on screen? Link to comment Share on other sites More sharing options...
F4llfield Posted April 3, 2023 Author Share Posted April 3, 2023 To try if it's working I was passing the result in a notification like so: Debug.Notification("The Actor's name is : " + ContainerActor[0].GetName()) and it came up blank. Link to comment Share on other sites More sharing options...
Fantafaust Posted April 3, 2023 Share Posted April 3, 2023 Assuming that your properties on the script are filled and there's an actor in there, you probably need to use GetActorBase aka:Debug.Notification("The Actor's name is : "+ContainerActor[0].GetActorBase().GetName()) Link to comment Share on other sites More sharing options...
F4llfield Posted April 3, 2023 Author Share Posted April 3, 2023 Yeap, working! Thanks. Link to comment Share on other sites More sharing options...
Fantafaust Posted April 3, 2023 Share Posted April 3, 2023 No problem, have fun Link to comment Share on other sites More sharing options...
DieFeM Posted April 3, 2023 Share Posted April 3, 2023 Another option, from the ObjectReference Script: ContainerActor[0].GetDisplayName() Link to comment Share on other sites More sharing options...
LarannKiar Posted April 3, 2023 Share Posted April 3, 2023 (edited) Just for the sake of completeness it's also possible without F4SE, if that matters. 1) Create a Quest: Run Once flag must be unchecked2) Add a Reference Alias: name it MyAlias, Uses Stored Text must be checked.3) In a script, fill your actor to the reference alias you made in 2)4) Create a Message form: name it MyMessage, Owner Quest should be the quest you made in 1), Message Text: The Actor's name is <Alias=MyAlias>.5) Call MyMessage.Show() to display the actor's name. Edited April 3, 2023 by LarannKiar Link to comment Share on other sites More sharing options...
lee3310 Posted April 3, 2023 Share Posted April 3, 2023 Another option, from the ObjectReference Script: ContainerActor[0].GetDisplayName() I used that function along with "Rename Anything" "SetRefName()" to copy a ref name to another but it only works when the PC is in same cell (refs are 3d loaded) Link to comment Share on other sites More sharing options...
LarannKiar Posted April 4, 2023 Share Posted April 4, 2023 Another option, from the ObjectReference Script: ContainerActor[0].GetDisplayName() I used that function along with "Rename Anything" "SetRefName()" to copy a ref name to another but it only works when the PC is in same cell (refs are 3d loaded) GetDisplayName() should also work on unloaded but persistent object references that have displayable names. Link to comment Share on other sites More sharing options...
Recommended Posts