![]() |
|
|
#1 |
|
Архивный участник
Join Date: Apr 2006
Posts: 70
|
1. Anyone knows all math functions of AI in NASC e.g. sqrt and etc? (symbol ^ is xor)
2. I making moving NPC's, but have a problem! When no one of players don't see the NPC, he will stoops and no making next movetodesire event, or not finish current. How to fix this? |
|
|
|
|
#2 | |
|
Архивный участник
Join Date: Feb 2006
Posts: 453
|
Quote:
2. dont use DoNothingDesire, use AddTimer inside CREATED and TIMER_FIRED events, and inside TIMER_FIRED use your MoveTo stuff |
|
|
|
|
|
#3 | ||
|
Архивный участник
Join Date: Apr 2006
Posts: 70
|
Quote:
![]() I say more! NPC stops only on finish point of movetodesire, not on path. When NPC is stopped, and I going to NPC, when I see NPC, he's continue moving! Strange system, but maybe it's made to decrease server loading. |
||
|
|
|
|
#4 |
|
Архивный участник
Join Date: Apr 2006
Posts: 70
|
About math functions, I already find some functions:
% mod | bit or & bit and and so.... server not have a sqrt function or operator... |
|
|
|
|
#5 | |||
|
Архивный участник
Join Date: Feb 2006
Posts: 453
|
Quote:
MOVE_TO_FINISHED MOVE_TO_WAY_POINT_FINISHED MOVE_AROUND_FINISHED try to add new desires somewhere there |
|||
|
|
|
|
#6 |
|
Архивный участник
Join Date: Apr 2006
Posts: 70
|
[rus]
Ты не понял! Я все эти функции уже пробовал! Возможно нужна какая-то манипуляция с его глобальными параметрами, типа float MoveTo_DecayRatio = 0.0; или float MoveTo_BoostValue = 0.0; Он вообще игнорит все приказы передвигаться куда либо, если рядом никого нету! Но как только кто-то рядом появляется, у него просыпается желание и он бежит сломя голову дальше! Я пробовал даже делать телепортацию с таймером, но в результате он после всех телепортаций начинал бегать дальше туда, куда он до этого не добежал! [/rus] many word, no sense.. sorry others! :roll: |
|
|
|
|
#7 | |
|
Архивный участник
Join Date: Feb 2006
Posts: 453
|
Quote:
lol, you really need sqrt in AI ? - sqrt for integer values using common operands: Code:
unsigned sqrt_newton(long l)
{
long temp, div = l;
unsigned rslt = (unsigned)l;
if (l <= 0)
return 0;
while (1)
{
temp = l / div + div;
div = temp >> 1;
div += temp & 1;
if (rslt > div)
rslt = (unsigned)div;
else
{
if (l / rslt == rslt - 1 && l % rslt == 0)
rslt--;
return rslt;
}
}
}
|
|
|
|
|
|
#8 | ||
|
Архивный участник
Join Date: Apr 2006
Posts: 70
|
Quote:
|
||
|
|
|
|
#9 | |
|
Архивный участник
Join Date: Feb 2006
Posts: 453
|
Quote:
add Say texts to handlers to see when and what fired e.g. PSTATE_IDLE IDLE_FINISHED IDLE_INTRRUPTED etc... |
|
|
|
|
|
#10 | ||
|
Архивный участник
Join Date: Apr 2006
Posts: 70
|
Quote:
but something need to do... ok, I'm go on thinking... |
||
|
|
|
|
#11 |
|
Архивный участник
Join Date: Feb 2006
Posts: 453
|
i think GM in insivible mode not visible for mobs...
and they possible will still in idle mode, when that GM will close maybe not... not tested.. |
|
|
|
|
#12 | |
|
Архивный участник
Join Date: Apr 2006
Posts: 70
|
Quote:
You right think that I do all it in hide mode? :lol: Not, this problem is very serious! |
|
|
|
|
|
#13 |
|
Архивный участник
Join Date: Apr 2006
Posts: 70
|
Are you know, RemoveAllAttackDesire will remove only attack desires or all desires?
|
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|