I'm working on a puzzle type dungeon and one of the puzzle's is a morphitem maze. I want to keep the player from "reaching over" the gravestone's I'm using as blockers to pull the lever. I would be able to do this by requiring that the player be within 1 tile of the switch, but as is it seems it hase a range of 3.
P.S. I have several "Tip's" writeups for dungeon puzzle's I need to do. This would be an excellent feature for this.
I believe the range is 2 with a LOS requirement. It is set in the OnDoubleClick methods for the switches.
CODE |
if (!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this)) { from.SendLocalizedMessage(500446); // That is too far away. return; }
|
(edit)
Adding a property that could set the range to something other than 2 is a good idea
Ok, You lost me lol. Is that snippet the code for the prop? Or is that just showing where it is found?
that is the code that is actually in the current OnDoubleClick methods of the various switches.
(edited previous post to clarify)
I think i remember the switche's ignoring Z levels as well, I'll go test it.
You are correct. The core InRange methods do not consider Z