Page 1 of 1

Check by other property?

Posted: Sun May 08, 2005 11:24 pm
by lizardkid
How can i tell an AI to run to a pathnode with a specific targetname and a specific other field. (like #set)

Is it possible?

Posted: Mon May 09, 2005 12:41 am
by Elgan
ai moveto $blah surly?

not used ai before mind,

Posted: Mon May 09, 2005 3:16 am
by lizardkid
no, i know how to do that. :roll:

i mean this

Code: Select all

$targetname/$AI 
is looking for a pathnode with

Code: Select all

$targetname/$node
and a

Code: Select all

#field/special
so how do i check for the field as well as the $targetname?

.

Posted: Mon May 09, 2005 4:42 am
by tltrude
$AI moveto $node.field "special"

Er, something like that. The value of the #field property must be set in advance. If the value is a number, you don't need the quotes.

Posted: Mon May 09, 2005 6:20 am
by Rookie One.pl
Let's say you give all the nodes the same targetname.

Code: Select all

for (local.i = 1; local.i <= $node.size; local.i++)
{
   if ($node[local.i].yourvalue == whatever)
      break
}
$ai runto $node[local.i]