Home   Help Search Login Register  

Author Topic: Question about "side player == west"  (Read 669 times)

0 Members and 1 Guest are viewing this topic.

PRiME

  • Guest
Question about "side player == west"
« on: 24 Dec 2002, 17:32:42 »
I need to do this map in mp and one thing I have noticed is that Player is the only thing that will load up and arm/move in vehicle or whatever, basicly I wanna do something like this, (just example)

? side player or AI == west : PlaneName = "BISCamel"

the or AI part is what I want to figure out, I need to get the AI name for that player and allot it to be either player or AI that gets inserted into the BISCamel, lets not worry about how im doing that as all I need help on is how to say "or ai"

Obviously there must be some small set of commands I can put in to determine the AI of that unit. Or perhaps I could do it with another trigger or what not.

Thanks in advance


Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Question about "side player == west"
« Reply #1 on: 24 Dec 2002, 19:28:09 »
? side player or AI == west : PlaneName = "BISCamel"

the or AI part is what I want to figure out, I need to get the AI name for that player and allot it to be either player or AI that gets inserted into the BISCamel, lets not worry about how im doing that as all I need help on is how to say "or ai"

If I understand you correctly, in short you just want to check if a unit belongs to the west side, and if so, you want to move it into the Camel.

If that's true, then whether or not the unit is AI or player-controlled doesn't matter.  Simply, give your unit a name, and then check to which side the unit belongs.

In a trigger, you'd use the following code:

Code: [Select]
? (side UnitName == west) : PlaneName = "BISCamel"
Obviously, replase UnitName with whatever name you gave to the unit in question.

If my understanding is mistaken and for whatever reason you really do need to know if the unit is AI or player-controlled, you can use the following code instead:

Code: [Select]
? ((UnitName == player) and (side UnitName == west) : PlaneName = "BISCamel"

? ((UnitName != player) and (side UnitName == west)) : PlaneName = "BISCamel"

I'd assume that you'd want one of the units to get into a different plane instead in this case, though.  Modify as necessary.
Ranger