Jump to content

Script help request


thomasd1979

Recommended Posts

@gsmanners:

I'd expect your script to halt on line 20:

set target to target.GetNextRef

GetNextRef is not a reference function, so I'd expect attempting to call it with explicit reference syntax to cause a script halt. This would explain why your script only worked for the first reference.

 

If you change line 20 to this, then I would expect your script to work:

set target to GetNextRef

@lostmisery:

It would be best for you to create a new thread for your problem instead of "hijacking" this one. I've reported your post not out of any malicious intent, but so that a moderator might move it into a new thread so that anyone who wishes to help you can do so without taking this thread off-topic.

 

Cipscis

Link to comment
Share on other sites

Increasing the value of GetFirstRef's "cell depth" parameter could probably increase the range of the effect.

 

I'll try this when I get home tonight. Hopefully with some more tweaking I can get it out to about 200 yards which I would think is a good range for something like this to work at.

 

I think that a better way to remove the effect would be to use a token (an unplayable, therefore invisible piece of armour). Basically, instead of calling PlayMagicShaderVisuals and StopMagicShaderVisuals in this script, you'd add a scripted token to the inventory of the actor.

 

Once I get the system up to a "Working reasonably with bugs" status, I'll try this to see if it can help the slight delay on removing the effect.

 

I've left in your "iCount"/"iCountMax" code because I'm not sure what it's doing, so I don't want to get rid of it in case it's something that you need.

 

The count code is purely to ensure that the script runs through 49 times and no more per game cycle. I actually borrowed the concept and terms from your explanation and example on your scripting tutorial :)

 

BTW, Thank you very much for all your help thus far. When this eventually becomes a public mod, your getting a big thank you blurb right up front. Without your help I doubt this ever would have gotten off the ground.

Link to comment
Share on other sites

@lostmisery:

It would be best for you to create a new thread for your problem instead of "hijacking" this one. I've reported your post not out of any malicious intent, but so that a moderator might move it into a new thread so that anyone who wishes to help you can do so without taking this thread off-topic.

 

Cipscis

 

 

ya like I had said at the start I wasn't sure, and am having no luck on the forums regardless. So dont worry about moving it to a new thread. i'm sure i'll stumble across the answer soon enough and have it working in game. Thanks anyhow

Link to comment
Share on other sites

@gsmanners:

I'd expect your script to halt on line 20:

set target to target.GetNextRef

GetNextRef is not a reference function, so I'd expect attempting to call it with explicit reference syntax to cause a script halt. This would explain why your script only worked for the first reference.

 

Thanks for the syntax pointer, but that isn't the problem. I think FOSE is ignoring the reference, not halting the script. As I said, the script works just fine with normal NPCs and *most* creatures.

Link to comment
Share on other sites

Ok so after some more tweaks and after I found and removed a mistake I had made, It now works perfectly. I'm still directly applying and removing effects, but its instant now and you were right about the cell depth. now that I've tweaked that to 3, it now grabs everything in range of sight(including with a good scope). I don't see any slowdown on my machine, but not 100% sure how a slower machine would handle the scripts. The night vision, enhanced night vision, and thermal vision are all done now.

 

Now I'm starting to tackle the predator vision. This one is gonna be rough. If anyone knows anything about how to convert the heat vision mod from oblivion that has been posted on the forums here, please let me know. I'm gonna need all the help I can get.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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