Jump to content

Having issues with "if player.getInWorldSpace " and if/else


pocketsizerules

Recommended Posts

In a mod I'm tinkering with, I've created a new custom effect which is triggered when the player enters a specific new worldspace (the map in question is a separate worldsplace rather than a cell in the Mojave or an interior).

 

The custom effect properly triggers upon entry, but I was hoping to use an "else" to remove the effect. That way if the player leaves the worldspace in one of a few different ways, the effect will stop, regardless of how they leave. There's only one method of entry to the worldspace the first time, so I was able to set an entry marker that triggers the space initially.

 

Here's basically what I've got:

 

begin gamemode
if player.getInWorldSpace DeadForest == 1
player.addSpellns DeadForestEffect
else
player.RemoveSpell DeadForestEffect
endif
end

 

The "else" part of the statement isn't triggering.

 

Any ideas? I was thinking of using a Begin onTriggerLeave, but I think that would only work for one method of exit with a trigger ref. Not, like, a moveto away from the worldspace.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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