[Solved] What is the 5th parm for checkLineOfSight()?
Posted: Thu Nov 13, 2014 1:06 am
I have been looking at map:checkLineOfSight() and map:checkLineOfFire(). These are very powerful. Both of them take 5 parameters and I am unsure about what the 5th one is.
The 1st four are: x1, y1, x2, y2
The last one is a number too though I am about 80% sure it is treated like a boolean. I seems that if the value is 0, then both of the commands report false when things block. A non-zero value means they report true more often. But exactly when I am not sure of.
Below are my findings for each, taking into account 0 and non-zero for the last parm:
CheckLineOfSight():
Will always report false on wall block
Will always report true, meaning will ignore object blocking (party, mob...)
Will always report true on invisible_wall blocking
5th parm 0: Will report false on closed door blocking
5th parm 1: Will report true on closed door blocking
CheckLineOfFire()
Will always report false on wall block
5th parm 0: Will report false on object block (party or mob will block).
Will report false on invisible_wall blocking
Will report false on door blocking
5th parm 1: Will report true on object blocking (no blocking)
Will report true on invisible_wall and closed door blocking
PLease let me know if I have these wrong or if you can better explain what this last parm does. Thanks.
The 1st four are: x1, y1, x2, y2
The last one is a number too though I am about 80% sure it is treated like a boolean. I seems that if the value is 0, then both of the commands report false when things block. A non-zero value means they report true more often. But exactly when I am not sure of.
Below are my findings for each, taking into account 0 and non-zero for the last parm:
CheckLineOfSight():
Will always report false on wall block
Will always report true, meaning will ignore object blocking (party, mob...)
Will always report true on invisible_wall blocking
5th parm 0: Will report false on closed door blocking
5th parm 1: Will report true on closed door blocking
CheckLineOfFire()
Will always report false on wall block
5th parm 0: Will report false on object block (party or mob will block).
Will report false on invisible_wall blocking
Will report false on door blocking
5th parm 1: Will report true on object blocking (no blocking)
Will report true on invisible_wall and closed door blocking
PLease let me know if I have these wrong or if you can better explain what this last parm does. Thanks.