Jump to content

Recommended Posts

I am trying to make a static object that blinks, it's basically a shape with a high emissive rvmat assign and another shape that is behind the high emissive shape that only has a simple texture. My goal is to hide and unhide every X seconds/frame the high emissive shape in other to make a blinking "light".

 

My p3d is composed by one resolution lod, with 2 named selections that are light_base (non emissive surface) and light (high emissive surface); and another geometry lod with mass and components set

 

The model itself works, only the hide and unhide part is missing.

 

model.cfg

Spoiler

class CfgSkeletons 
{
	class SimpleBlink_Skeleton
	{
		isDiscrete = 1;
		skeletonInherit = "";
		skeletonBones[] = 
		{
			"light", ""
		};
	};
};

class CfgModels
{
	class SimpleBlink
	{
		sectionsInherit="";
		sections[] = {};
		skeletonName = "SimpleBlink_Skeleton";

		class Animations
		{
			class Beacon1 
			{
				type = "Hide";
				selection = "light";
				source = "time";		
				animPeriod = 0;	
				sourceAddress = "loop";
				minValue = 0;
				maxValue = 1;
				hideValue = "0.5";	
			};
		};
	};
};

 

 

config.cpp

Spoiler

 


class CfgPatches 
{
	class SimpleBlinkAddon 
	{
		units[] = {'SimpleBlink'};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Functions_F"};
	};
};

class CfgVehicles 
{
	class Static;
	class SimpleBlink : Static 
	{
		scope = 2;
		displayName = "Blue beacon";
		model = "\beacon\beacon.p3d";
	};
};

 

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

×