Code That Affects AI Only [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Lorul1
Rebel Colonel
Rebel Colonel
Posts: 562
Joined: Wed Apr 24, 2013 10:34 pm
Projects :: Assault on Theed
Games I'm Playing :: Battlegrounds
xbox live or psn: No gamertag set
Location: Your House

Code That Affects AI Only [Solved]

Post by Lorul1 »

I know that there is something that you can put before scripts so that only humans are affected by it. i think its something like "if character is human" BUT I'm looking for something that I can use so only the AI (or computer players) can be affected by. In other words I have a region that I only want the AI to be effected by, how do I do this ?
Last edited by Lorul1 on Sun Jun 29, 2014 12:19 pm, edited 1 time in total.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: Code That Affects AI Only

Post by razac920 »

instead of

Code: Select all

  if IsCharacterHuman(player) then
  [your code]
  end
write

Code: Select all

  if not IsCharacterHuman(player) then
  [your code]
  end
Last edited by razac920 on Sun Jun 29, 2014 10:36 am, edited 1 time in total.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: Code That Affects AI Only

Post by Locutus »

if not IsCharacterHuman(player) then ;)

Edit: Dang, apparently I got ninja'd by half a second or so :runaway:
User avatar
Lorul1
Rebel Colonel
Rebel Colonel
Posts: 562
Joined: Wed Apr 24, 2013 10:34 pm
Projects :: Assault on Theed
Games I'm Playing :: Battlegrounds
xbox live or psn: No gamertag set
Location: Your House

Re: Code That Affects AI Only

Post by Lorul1 »

Hahaha
Thanks guys 8)
Post Reply