Jump to content
Ganvai84

[SOLVED ]Getting a player object with thisList

Recommended Posts

Hey guys,

I have a hard time understanding what thisList or list triggerOne is giving me back as object.

 

The idea is, that when a trigger is activated, it sets the fuel of the car the player is in to 0 (or damages one of its wheels).


_list = list tr_fuel1;

_vehicle = objectParent (_list select 0);

But seems like that what is standing in (_list select 0) is not a player object.

 

So, the noob I am, I check what I get there instead:


hint format ["Player: %1", _list select 0];
 

"Bravo 1-1 Alpha 1: (jan)(s1)"

 

Gives me a lot of stuff in there. The Radio Name, the Players name and the player variable. Is there an elegant way to get the player variable out of this so I can work with it further on? Or is there any kind of way where I can change the returnvalue of (_list select 0) into a player object?

Cheers, Jan

Share this post


Link to post
Share on other sites

thisList is a variable depending on the preset condition (only). So, if you preset any player present , you will obtain an array with the entering player in the area. (and the trigger will stay active til the player leaves, if no other condition. thisList is for PRESET only.

In a trigger, you detect vehicle or unit. you can write    {_x setFuel 1} forEach thisList     in on activation field.

Note: thisList has no sense in deactivation field.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×