Comments (17)
and only underground withour ARGN!! - shows 1
from source-x.
@Steinny i use it in my script.
Move a NPC where there no map(black zone) it will return 1.
Place boulder rock around. Shoule work too.
How do you test it?
from source-x.
Seem to only check static item.... Spawn NPC on a mountain and it work.
Maybe we should evaluate added in game item...
from source-x.
is the castle wall not static enough?
from source-x.
ON a quick check, server only evaluate if player can move... Static and in game intem shoud change nothing
bool CChar::IsStuck(bool fFreezeCheck)
{
CPointMap pt = GetTopPoint();
if ( fFreezeCheck && OnFreezeCheck() )
return true;
return !( CanMoveWalkTo(pt, true, true, DIR_N) || CanMoveWalkTo(pt, true, true, DIR_E) || CanMoveWalkTo(pt, true, true, DIR_S) || CanMoveWalkTo(pt, true, true, DIR_W) );
}
from source-x.
as I see it without arguments
from source-x.
ISSTUCK R Returns 1 if the character cannot walk in any direction.
this is not how this function works
it checks for a specific!!!! tile where you stay on passability!!!
from source-x.
this is not how this function works it checks for a specific!!!! tile where you stay on passability!!!
Don't mad, what you propose? For me it's clear. When you char cannot move in any direction it return 1.
Apparently canmovewalkto do not consider some item on the path.
I use it on my custom spawn point. After I spawn a NPC, I check isstuck. If npc is spawned on water or on black area map, it return 1.(So it work correct on specific case)
from source-x.
the function does not work as described
from source-x.
my self-written function where I just make the npc run in all directions works better and how it described in wiki ))
from source-x.
ISSTUCK isn't check the dir you are entering, it only checks if you can move in North, West, South or East, if you can walk any of these direction, it returns 0.
For Underground check, LLama can only not walk to left, so he can move other 3 directions, so yes return 0 is correct.
For the half blocks, they are walkable, so llama can walk on them, so yes he can walk all directions 0 is correct.
While you are in an item/wall/table etc. that blocks you to walk any side, it returns 1.
ISSTUCK means you can't walk any direction. Maybe you thought it shows only if he can walk to any direction but it's not for it. it's CANMOVE dir
from source-x.
ISSTUCK isn't check the dir you are entering, it only checks if you can move in North, West, South or East, if you can walk any of these direction, it returns 0.
but it doesn't even work that way. he checks the passibility of the tile according to my test. look last screen
from source-x.
ISSTUCK isn't check the dir you are entering, it only checks if you can move in North, West, South or East, if you can walk any of these direction, it returns 0.
but it doesn't even work that way. he checks the passibility of the tile according to my test. look last screen
I am testing it on my sphere, and it works fine for me, it doesn't return 0 when I am in a table, do you have any function named ISSTUCK that overrides default behaviour?
from source-x.
Strange. NO.
I do all my functions like f_function
from source-x.
Okay, I think I find out the issue, let me check, Okay I will take a note for this issue, I will check it in next pr.
from source-x.
I see no issue.
IsStuck-> If npc can walk on any direction, it is not stuck, so it return 0
Im not sure if thoose are walls. I think they are consider as stairs ("bridge" in tiledata) I think if u say "all come" npc can walk on it even if players is not able. Did not test it and not sure but I think npcs can climb thoose.
No args accepted for isstuck as werswood said.
from source-x.
Okay, I think I find out the issue, let me check, Okay I will take a note for this issue, I will check it in next pr.
What did you find?
Is this height related?
is correct that isStuck always check OnFreezeCheck()?
from source-x.
Related Issues (20)
- Calling custom trigger on timerf HOT 4
- Feature Request- Check sphere.ini on server boot.
- Add workflow for ARM64 build generation HOT 3
- Move the server binary of the workflow HOT 3
- Broken Profiler HOT 9
- @clienttooltip being called without client request? HOT 1
- NPC_AI_LOOTING not really looting? HOT 1
- Running a second sphere instance make sphere crash
- Server do not take correct light number on lightsource HOT 4
- COMBAT_ALLOWHITFROMSHIP should disregard LOS HOT 2
- Advanced LOS additional settings HOT 2
- HITLEECHLIFE, HITLEECHMANA, HITLEECHSTAM - no limit HOT 2
- Food & Maxfood on Chars - After Reboot reset
- brain_berserk issue
- need for spellflag_targ_no_static
- [Feature Request] Corpse NOREJOIN HOT 10
- [Feature Request] CLOSECONTAINER and CLOSEVENDORMENU
- [Feature Request] Server Maintenance Mode HOT 3
- [Feature Request] More f_onserver commands
- [Feature Request] New triggers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from source-x.