dAbalo8 Posted August 24, 2020 Share Posted August 24, 2020 Basically the title. I use GetRefs to get all actors and then addspellNS to give each of them an actor effect. It works on every actor in the vicinity except for the powder gangers around Jean skydiving. GetRefs does get them, I checked for that so that's not the problem, they just don't get the actor effect while every other actor gets it. If tried from console, on the spot, addspellNS does work on them but for some reason it just doesn't when run from script or is immediatelly dispeled? Any ideas on why or how to circumvent this issue? Link to comment Share on other sites More sharing options...
UnvalidUserName Posted August 24, 2020 Share Posted August 24, 2020 You should check if those are enabled by default, a lot of NPCs and enemies in the game are disabled until the player is close enough. If they are disabled, that might be why. Link to comment Share on other sites More sharing options...
dAbalo8 Posted August 25, 2020 Author Share Posted August 25, 2020 You should check if those are enabled by default, a lot of NPCs and enemies in the game are disabled until the player is close enough. If they are disabled, that might be why.They are enabled. I check for that before giving the actors the effect and since their ref gets to that portion of the script they definitely have to be enabled. Also if I run the script right in front of them it still doesn't apply which is very strange because if I spawn some other npc near them it will get the effect, hell even NCR troopers in primm get the effect, but these powder gangers and primm powder gangers never do. I found out that they are listed in geck as "SpecialGanger"-s but couldn't make out what made them or their template special or what to do about it, I'd really like to avoid altering the records here if it can somehow be done with scripts Link to comment Share on other sites More sharing options...
GamerRick Posted August 25, 2020 Share Posted August 25, 2020 (edited) Maybe try some other script commands on those NPCs (like adding something to their inventory) just to see if they work. Make sure you are doing the AddSpellNS command on a Actor Ref and not the BaseID. Go from there. Edited August 25, 2020 by GamerRick Link to comment Share on other sites More sharing options...
dAbalo8 Posted August 26, 2020 Author Share Posted August 26, 2020 (edited) Maybe try some other script commands on those NPCs (like adding something to their inventory) just to see if they work. Make sure you are doing the AddSpellNS command on a Actor Ref and not the BaseID. Go from there.Tried giving them firehelmets, they don't seem to like them either, easy pete looks fabulous in it though! EDIT: Turns out for some reason these ganger won't accept anything unless the script runs on them when the player is in their cell so I added some other checks and now it does work. Edited August 26, 2020 by dAbalo8 Link to comment Share on other sites More sharing options...
GamerRick Posted August 26, 2020 Share Posted August 26, 2020 Can you please cut/paste the script here? I would like to see how one would do such a thing. Link to comment Share on other sites More sharing options...
dAbalo8 Posted August 26, 2020 Author Share Posted August 26, 2020 Can you please cut/paste the script here? I would like to see how one would do such a thing.It's a complicated and unoptimized script that will have to be explained if posted, neither of us wants that neither am I sure that I can actually explain it without hitting my head against the table corner.The problem with the script was that it saved an actor ref into an array when giving it the effect (if they were neither dead nor disabled) and just ignored those actors next time they were caught in GetRefs. For some reason this gangers were caught in the first run of the script but despite being enabled and alive didn't get the effect and when the player walked into their cell and the script ran on them again they were simply ignored.What I did was I simply added to the skip condition (if actor is already in the array) another condition to check if the "actor to be skipped" has the desired effect, if not I just add the effect and voila, it sticks since the player is in the actor's cell. Link to comment Share on other sites More sharing options...
Recommended Posts