Home   Help Search Login Register  

Author Topic: need to find out if player activated trigger(condition feild)  (Read 1645 times)

0 Members and 2 Guests are viewing this topic.

Mr.Pibb

  • Guest
 Hi

 Tryin like hell to get this condition script for a trigger to work.

 this && ((west countSide thisList > 0) || (east countSide thisList > 0) || (player == thislist))

 The last 'or' statement I added, which never registers, and I have tried like 3 different combos.

 Can someone tell me what I need to input on that last 'or' statement to see if a player activated the trigger?

 Reason being that the player may be considered side 'enemy', which I cant reference using side 'enemy', so just finding out if it was a player is all I need.

 Thanks
« Last Edit: 05 Dec 2004, 03:29:38 by Mr.Pibb »

Komuna

  • Guest
Re:need to get player that activated trigger(if a player did)
« Reply #1 on: 05 Dec 2004, 02:17:47 »
Your problem is here:

player == thislist

The player is considered an object, thus he cannot be equal to an array of values, which is the kind of data returned by 'thislist' in a trigger activation field.

So you can try one of those:

player in thislist --> check if the player is one of the units that activated the trigger

thislist == [player] --> check if player is the only unit that activated the trigger


Good luck, mate!

#Edit

If I'm not wrong, you can skip the 'this' from the condition. You use 'this' only if you don't have any proper conditions to input except the ones in the trigger UI.

so:

condField = "blah && blah && player in thislist"
« Last Edit: 05 Dec 2004, 02:25:07 by Komuna »

Mr.Pibb

  • Guest
Re:need to get player that activated trigger(if a player did)
« Reply #2 on: 05 Dec 2004, 02:37:29 »
 Thanks Komuna

 Did try the player in thislist, nothing, no activation, will try the other u suggested thanks :)

 btw, gotcha on the 'this' part, its actually a trigger from cti that uses anyone to activate it, so prolly should leave that alone :)
« Last Edit: 05 Dec 2004, 02:40:41 by Mr.Pibb »

Mr.Pibb

  • Guest
Re:need to get player that activated trigger(if a player did)
« Reply #3 on: 05 Dec 2004, 02:58:12 »
 nodda, nothin, :(

 Using brackets around player caused error in editor, so I removed them and tried it, no activation. Might just have to type in all player names to refer to.

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:need to find out if player activated trigger(condition feild)
« Reply #4 on: 05 Dec 2004, 10:09:20 »
Try :

(local player) and((west countSide thisList > 0) or (east countSide thisList > 0))

The thing is U want to find out if an AI or a human player entered the triggerarea,is that correct?
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Mr.Pibb

  • Guest
Re:need to find out if player activated trigger(condition feild)
« Reply #5 on: 05 Dec 2004, 20:30:49 »
 Its actually a  condition feild script from cti, the one that adds the res to each town.
 So I just want to add that extra part to it that, yes, would also activate if it was a player that entered radius- being like I said that player may be on 'enemy' side, which isnt refferable. But it needs to be in an 'or' statement along with the others, it cant be part of the whole required condtion, just a seperate condition, being that ai may come in and out which must activate it also.

 Ill give it a go, thanks Platoon Patton
« Last Edit: 05 Dec 2004, 20:33:38 by Mr.Pibb »

Mr.Pibb

  • Guest
Re:need to find out if player activated trigger(condition feild)
« Reply #6 on: 05 Dec 2004, 21:29:24 »
 Platoon Patton, u da man!

 It works, finally :)

 Thanks Platoon Patton and Kamuna for your time.

 Leaves me with a new option here, great