Zorkaz Posted March 15, 2021 Share Posted March 15, 2021 What I originally wanted to do (But failed)I wanted to make a utility gun that could add actor values and keywords to activators and static objects.Yet MagicEffects currently only allow Actors to be edited and even recognized QuestionSo is there another way to get what kind of object I'm pointing at in-game, checking what keywords or values it has and maybe even change it? Link to comment Share on other sites More sharing options...
LarannKiar Posted April 5, 2021 Share Posted April 5, 2021 Sorry I might be misunderstanding it, but you can use the HasKeyword, AddKeyword, RemoveKeyword and GetValue, SetValue functions on ObjectReferences. ObjectReference Property myObjRef Auto Const Keyword Property myKeyword Auto Const ActorValue Property myAV Auto Const myObjRef.HasKeyword(myKeyword) myObjRef.GetValue(myAV) myObjRef.AddKeyword(myKeyword) / myObjRef.RemoveKeyword(myKeyword) myObjRef.SetValue(myAV, newValue) Link to comment Share on other sites More sharing options...
dylbill Posted April 6, 2021 Share Posted April 6, 2021 You can also use GetBaseObject to check for type if you know what you're looking for. Form Base = MyObjectRef.GetBaseObject() If Base as Weapon ;MyObjectRef is a weapon, do something Elseif Base as Armor ;MyObjectRef is an armor, do something. Endif Link to comment Share on other sites More sharing options...
Recommended Posts