Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   AI - About myself.boss anf float (https://postpacific.loc-online.com/showthread.php?t=3325)

Kirikups 12.02.2006 00:58

AI - About myself.boss anf float
 
Greetings,

coding some AI i used:

myself.boss.hp
myself.boss.max_hp


and i have no error when i compil, but i would like to know if maybe someone can tell me that syntax is really correct or ignored by compiler, i want my NPC as a Minion checking his master stats, and if he has (master) hp < max_hp/2 then he will heal him...

In other part i would like to check NPC and PC levels to decrease some parameter:

Code:

in MyParameter = 100;
...
i0 = 1;
if ((myself.sm.level / attacker.level) < 1) {
        i0 = (myself.sm.level / attacker.level);
}
...
Result = MyParameter * i0;

It seems like Results is always 0 and never 0,XXX

Tx for your help, i have some doubts because of myself.sm and myself.sm.level syntax :)

hr 12.02.2006 08:44

use f0 instead of i0

Kirikups 12.02.2006 17:25

tx a lot, i think i understood :)


All times are GMT. The time now is 16:06.