Jump to content

Stealth armor problem, can a script solve the problem?


christianerding

Recommended Posts

Hello Fellows,

 

I downloaded the stealth armor pack and did unwrap it, to the how it works, because I am very new to modding.

 

It uses the "Stealthboyinvis" Effect and only works when you sneak.

 

So far so good...

 

My Question:

 

Is it possible to delay the effect, so I only get invisble when I sit still for 10 seconds??

 

Another thing I did see:

 

There is stealthboyinvis effect und stealthfield effect, can someone explain the difference between the two?

 

 

THX a lot, Christian

Link to comment
Share on other sites

I've done some experimenting and this effect script seems to work so far, but would need some modification...

 

scn testdelayedstealth

 

float timer

 

begin scripteffectupdate

 

if player.IsSneaking==1

if timer>10

player.AddSpell StealthBoyInvisibilitySpell

else

set timer to timer + GetSecondsPassed

endif

else

if timer>0

set timer to 0

endif

endif

 

end

 

first, you should probably change the timer variable name to something that won't cause conflicts with other mods, I don't know if local variables can conflict or not but i usually add a few letters to the start of mine.

 

next, you'll need a way to turn the stealth off when you stop sneaking, probably just adding player.removespell StealthBoyInvisibilitySpell under the line that says set timer to 0 should do it.

 

there's also the problem that this causes a message to appear when the stealth is activated which I haven't found a way to supress. and it only gives you the stealth field effect, not any increase in sneaking ability, but it should be easy to add extra effects to it.

 

There might be easier and better ways of doing this, but I've only just started learning to do effect scripts so hope this helps.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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