Full Version : Range Requirement for Switches/levers
xmlspawner >>XMLSpawner Feature Request's >>Range Requirement for Switches/levers
<< Prev | Next >>
godfood- 01-17-2006
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.
ArteGordon- 01-17-2006
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
godfood- 01-17-2006
Ok, You lost me lol. Is that snippet the code for the prop? Or is that just showing where it is found?
ArteGordon- 01-17-2006
that is the code that is actually in the current OnDoubleClick methods of the various switches.
(edited previous post to clarify)
godfood- 01-17-2006
I think i remember the switche's ignoring Z levels as well, I'll go test it.
ArteGordon- 01-17-2006
You are correct. The core InRange methods do not consider Z
godfood- 01-17-2006
blah...