Chrissiearto Posted June 29, 2017 Share Posted June 29, 2017 I'm having a problem with using the SetAttackActorOnSight command, and nothing I do is making it work in my Script. It will work as expected if I turn into a Werewolf, and then go visit some people, but even mimicking the way it is done in the Werewolf Script is not working in my own Script. I've tried various forms of writing it (from PlayerRef, to Game.GetPlayer(), etc), but nothing changes. Even running it continually in an OnUpdate Block has no results. The best I've managed is if I also send a Werewolf Transformation alert, and run it a few dozen times, it will finally activate, but not reliably. Does anyone have any thoughts on what might be causing it not to work? Link to comment Share on other sites More sharing options...
Aragorn58 Posted June 29, 2017 Share Posted June 29, 2017 I'm not a scripting expert, but if you post the script in spoiler tags, than someone may be able to help you. Link to comment Share on other sites More sharing options...
Chrissiearto Posted June 29, 2017 Author Share Posted June 29, 2017 For testing I used : Event OnInit() RegisterForSingleUpdate(1.0) EndEvent Event OnUpdate() PlayerRef.SetAttackActorOnSight(True) RegisterForSingleUpdate(1.0) EndEvent But even something as basic as that did not work :/ (For some reason, c+P is not working, so I'll have to wait until later to post the "Proper" code :/ ) Link to comment Share on other sites More sharing options...
Chrissiearto Posted June 30, 2017 Author Share Posted June 30, 2017 Here's a simple test Mod I made; even this does not work for me. It has to be started via the Console (I thought maybe it was having SGE set that might be breaking it, somehow) with "StartQuest ZCDMTestQuest". A Notification comes up on every update, to confirm it's running, but the actual command (copied directly from the one in Werewolf Change) still has no effect. Link : https://www.dropbox.com/s/cgvspip6cxvc239/Test.rar?dl=0 Can someone download, and confirm they're getting no effect, please? Link to comment Share on other sites More sharing options...
lofgren Posted June 30, 2017 Share Posted June 30, 2017 I don't think werewolf change uses this function. I'm pretty familiar with that script. If I recall this line is commented out and instead the script iterates through the crimefaction list and sets the player as an enemy of those factions. Link to comment Share on other sites More sharing options...
Chrissiearto Posted June 30, 2017 Author Share Posted June 30, 2017 Thanks for the reply! It sort of helps. In my Werewolf Script, it seems to be using both, as the line isn't commented out. Mimicking the Faction changes does work for me, but not if fired from the main Function which controls everything (using Notifications confirms the effect is running) only if I fire it immediately on game-load; so maybe I can work around that somehow... Hmm, you've helped me make progress, at least! :D Link to comment Share on other sites More sharing options...
Recommended Posts