Hey all. Since I'm a total dunce at all things script-rated, I'm stuck
I presently have a working vehicle ingame (managed to get that far ) but I'd like to be able to make the headlights and taillights come on when the player enters the vehicle.
I've been looking around for days for the answer and have poured through the hellbender and scorpion classes and I'm still not much wiser.
The vehicle texture is set up thusly:
0) Main body texture
1) Number plate
2) Headlight (I'll do the taillight later when I figure out the headlight)
All I want to do is, when the player enters the vehicle, swap the unlit Headlight texture for a lit one and back to the unlit one when they leave.
Sounds easy...but it's either really complicated (probably not) or I'm stupid (very likely)
I can use a materialinstance for this and I know how to set that up in the Ed and I also know how to call from uscript
But maybe it's easier just to swap textures.
I haven't a clue how to actually make this work when the player enters and leaves the vehicle tough.
Any help would really be appreciated.
I presently have a working vehicle ingame (managed to get that far ) but I'd like to be able to make the headlights and taillights come on when the player enters the vehicle.
I've been looking around for days for the answer and have poured through the hellbender and scorpion classes and I'm still not much wiser.
The vehicle texture is set up thusly:
0) Main body texture
1) Number plate
2) Headlight (I'll do the taillight later when I figure out the headlight)
All I want to do is, when the player enters the vehicle, swap the unlit Headlight texture for a lit one and back to the unlit one when they leave.
Sounds easy...but it's either really complicated (probably not) or I'm stupid (very likely)
I can use a materialinstance for this and I know how to set that up in the Ed and I also know how to call from uscript
Code:
var MaterialInstanceConstant HeadLightMaterial;
HeadLightMaterial = MaterialInstanceConstant'VH_HippyBus.Materials.HeadLightInstance';
//Turn on Headlights
HeadLightMaterial.setVectorParameterValue('Headlightemissive',MakeLinearColor(1,0,0,1));
}
But maybe it's easier just to swap textures.
I haven't a clue how to actually make this work when the player enters and leaves the vehicle tough.
Any help would really be appreciated.