Jump to content
Sign in to follow this  
nettrucker

Trigger condition when player access inventory of a car

Recommended Posts

Hi there

I did a search but I couldn't come up with anything related to that specific condition.

I want the player to control a car, but to succeed with the task he has actually to access the inventory of the car to get the objective done. What would be the trigger condition for succeeding with the task.

Furthermore there is the situation that I added 2 satchel charges to the cars weapon pool to simulate that the car is rigged with C4. Now in case the player access the car inventory he should see the satchels and the trigger should get activated.

What would be the condition for the trigger to activate.

Thanks for any advice and help.

Share this post


Link to post
Share on other sites

Hi nettrucker, maybe not 100% what you need but maybe you put in car inventory a specific weapan that player must take in mission and then you use HasWeapon commend (check bi wiki). Trigger will be activated after player take weapon from car inventory. So far i cant think nothing better then this :)

Share this post


Link to post
Share on other sites

Hi tom

hope that you are doing alright. Thanks for your reply, but it was not what I was looking for. I know the "hasWeapon" command but before I was trying to find a work around I would really like to figure out if it's possible to work out a condition when the player access the cars inventory and how I would have to formulate that.

In any case thanks.

cheers.

Share this post


Link to post
Share on other sites

The nearest thing I've seen is this.

Place the following line into init or gamelogic/vehicle ect

 ctrlSetText [RscDisplaGear, ""];

Then you will need to place a trigger (rectangle) over the vehicle, covering the area just outside where the gear can be accessed

in the trigger. Getting the size will be trial and error.

cond

 dialog and player in thislist

You can add more conditions to try and improve things.

Share this post


Link to post
Share on other sites

Trigger condition:

for "_i" from 0 to (count ((getWeaponCargo yourCarName) select 0) - 1) do { if (((getWeaponCargo yourCarName) select 0) select _i == "pipeBomb" AND ((getWeaponCargo yourCarName) select 1) select _i == 2) then {true} else {false} }

...checks if 2 satchel charges are deployed in the car`s cargo. Hope it helps a little?!

Share this post


Link to post
Share on other sites

Thanks for your replies guys. I was unable to check it yesterday. Gonna do it this evening when back from work.

Cheers

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
Sign in to follow this  

×