Check by other property?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Check by other property?

Post 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?
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

ai moveto $blah surly?

not used ai before mind,
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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?
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

.

Post 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.
Tom Trude,

Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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]
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Post Reply