Jump to content

Help. IsSwimming


ikermen

Recommended Posts

Hi:

First post.

And I need help, please.

I don´t know that is wrong, but my script refuses this command.

It simply does nothing.

 

If iswimming == 1 (or player.isswimming)

if initWater == 0

set TimerWater to 4

set initWater to 1

else

if TimerWater > 0

set TimerWater to TimerWater - GetSecondspassed

else

set initWater to 0

Player.CastImmediateOnSelf ElectricWaterSpell

endif

endif

 

If I remove the first IF, the script works.

What´s the problem?

Link to comment
Share on other sites

It's been reported that IsSwimming doesn't work correctly on the player - it will only work as intended on other Actors.

 

One possible workaround would be to move an Actor temporarily to the player's position and call IsSwimming on them, then either move them to some remote location or Disable them. This has been reported to be very slow, so if you go this route then I would recommend that you check less often than every frame.

 

Another approach, which only really works if the script only needs to apply in the Wasteland worldspace, is to check the player's Z coordinate, as the water level in the Wasteland worldspace is constant (although I don't know it off the top of my head).

 

Cipscis

Link to comment
Share on other sites

  • 3 weeks later...

in regard to your first post,

 

you are missing an endif command, as you had three if variables. which makes sense if you take away an if the script compiles. And an Endif at the end of the script and see if that works. also, if you're still having problems, try replacing the - with ==, see if that works.

 

idk what you are trying to do with this script, but that's my 2 cents

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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