Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 12.02.2006, 00:58   #1
Kirikups
Архивный участник
 
Join Date: Oct 2005
Posts: 175
Default 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
Kirikups is offline  
Old 12.02.2006, 08:44   #2
hr
Архивный участник
 
Join Date: Jun 2005
Posts: 285
Default

use f0 instead of i0
hr is offline  
Old 12.02.2006, 17:25   #3
Kirikups
Архивный участник
 
Join Date: Oct 2005
Posts: 175
Default

tx a lot, i think i understood
Kirikups is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:07.