Jump to content

Recommended Posts

i have this truck in my SP game and i want to turn it's right light off

 it is this truck C_Truck_02_covered_F

 

if i go to this page https://community.bistudio.com/wiki/createVehicle/vehicles

 

all i see is this when i find it 

C_Truck_02_covered_F

1. spz_hide => user

 

not any of those HitGlass5 => hit [HitGlass5] or anything else..

anyone got any ideas.

Share this post


Link to post
Share on other sites

Just the front right light? If so maybe find and delete the light source. 

Share this post


Link to post
Share on other sites
19 minutes ago, Mr H. said:

Just the front right light? If so maybe find and delete the light source. 

Yes it is just the front lights on the right side.

How do i find it in the Attributs  ???

or do i have to go inside the Config files..thru the config viewer 

Share this post


Link to post
Share on other sites

I don't think you can (disable a single light), however the trick would be to detect the light source with nearestObject and delete it

Share this post


Link to post
Share on other sites

For testing from the debugConsole...

//Spawn truck infront of player facing him
_vehicle = createVehicle [ "C_Truck_02_covered_F", player getPos [ 20, getDir player ], [], 0, "CAN_COLLIDE" ];
_vehicle setDir ( getDir player - 180 );

//Turn off vehicles right headlight light
_vehicle setHitIndex[ 23, 1 ];

The hitPoint you need is called #light_l and can be found by using getAllHitPointsDamage. Although it says _l it is actually the vehicles right headlight.

As the vehicle actually has multiple #light_l hitpoints you can not specify it by name. Instead you have to use its index that can be found by the position of the hitPoint name in the first array of getAllHitPointsDamage.

 

  • Like 3

Share this post


Link to post
Share on other sites
On 30/9/2018 at 7:20 PM, Larrow said:

For testing from the debugConsole...


//Spawn truck infront of player facing him
_vehicle = createVehicle [ "C_Truck_02_covered_F", player getPos [ 20, getDir player ], [], 0, "CAN_COLLIDE" ];
_vehicle setDir ( getDir player - 180 );

//Turn off vehicles right headlight light
_vehicle setHitIndex[ 23, 1 ];

The hitPoint you need is called #light_l and can be found by using getAllHitPointsDamage. Although it says _l it is actually the vehicles right headlight.

As the vehicle actually has multiple #light_l hitpoints you can not specify it by name. Instead you have to use its index that can be found by the position of the hitPoint name in the first array of getAllHitPointsDamage.

 

Thanks for the help Larrow it works just like i want it to.

 

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

×