Page MenuHomeFeedback Tracker

[feature request] add vectorDir to particle effects and pass variables to ontimer/beforedestroy script
Need More Info, NormalPublic

Description

When using the particle effect to create complex/part effects with a spaceobject, there is no way to control the objects orientation. Thus every spaceobject created is seemingly generated facing a random direction. This kind of control is already apart of particle arrays, and I would like to see it added to particle effects.

Additionally, Particle effects and particle array can both pass a _this variable to an ontimer/beforedestroy script that only contains the particles position. Would it be possible to expand what else is part of the _this and/or other variables that can be passed to the script in order to control the particle that calls the script? This is more of an issue for using particle effects since its all config based instead of script like particle array. Which implicitly allows such kind of script based controlling of the particle.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Feature Request

Event Timeline

are you saying this tweak is not working? https://feedback.bistudio.com/T151354

Leopard20 added a subscriber: Leopard20.EditedNov 10 2023, 7:20 PM

@BIS_fnc_KK I think they mean config one doesn't support vector dir/up like scripted ones
https://community.bistudio.com/wiki/Arma_3:_Particle_Effects

BIS_fnc_KK added a comment.EditedNov 10 2023, 8:10 PM

I'm very confused. The ontimer and before destroy already have _this with position https://community.bistudio.com/wiki/ParticleArray. Please provide more info and repro example

BIS_fnc_KK changed the task status from New to Need More Info.Nov 10 2023, 8:10 PM
darknightx33x added a comment.EditedNov 10 2023, 9:29 PM

@BIS_fnc_KK I think they mean config one doesn't support vector dir/up like scripted ones
https://community.bistudio.com/wiki/Arma_3:_Particle_Effects

Leopard is correct. I'm referring to the config one he linked to. It does not have a documented vector dir/up ability like the particle array you are think of.

This is the code im using for the particle generation with an older reference picture of the effect. The large yellow spikes are coming in at random angles:
class CfgCloudlets
{
class Default;
//-------------------------------------------------------------------------------------
class Impactbolt_impact: Default
{

		interval = 100;
		circleRadius = 0;
		circleVelocity[] = {0,0,0};
		particleShape = "tracer\test_bolt_impact";

particleFSNtieth = 16;
particleFSIndex = 13;
particleFSFrameCount = 2;
particleFSLoop = 0;

		angleVar = 0;
		animationName = "";
		particleType = "SpaceObject";
		timerPeriod = .05;
		lifeTime = 0.07;
		moveVelocity[] = {0,0,0};
		rotationVelocity = 0;
		weight = 1.275;
		volume = 1;
		rubbing = 0;
		size[] = {0.01,0.01};
		sizeCoef = 1;
		color[] = {{1,1,1,1}};
		colorCoef[] = {1,1,1,1};
		emissiveColor[] = {{1,1,10,1}};
		animationSpeed[] = {1000};
		animationSpeedCoef = 1;
		randomDirectionPeriod = 0;
		randomDirectionIntensity = 0;
		onTimerScript = "";
		beforeDestroyScript = "";
		blockAIVisibility = 0;
		onSurface = false;
		keepOnSurface = false;
		bounceOnSurface = -1;
		bounceOnSurfaceVar = 1;
		lifeTimeVar = 5;
		position[] = {0,0,0};
		positionVar[] = {0,0,0};
		positionVarConst[] = {0,0,0};
		moveVelocityVar[] = {0,0,0};
		rotationVelocityVar = 0;
		sizeVar = 0;
		colorVar[] = {0.05,0.05,0.05,5};
		randomDirectionPeriodVar = 0;
		randomDirectionIntensityVar = 0;

};
};

class ImpactTest
{
class ImpactDust
{

		simulation="particles";
		type="ImpactSmoke";
		position[]={0,0,0};
		intensity=1;
		interval=1;
		lifeTime=1;

};
class Impactbolt
{

		simulation = "particles";
		type = "Impactbolt_impact";
		position[] = {0,0,0};
		intensity = 1;
		interval = 1;
		lifeTime = 10;

};
};

class CfgAmmo
{
class BulletBase;
class PBK_Ammo_Rifle: BulletBase
{
class HitEffects

		{
			Hit_Foliage_green="ImpactTest";
			Hit_Foliage_Dead="ImpactTest";
			Hit_Foliage_Green_big="ImpactTest";
			Hit_Foliage_Palm="ImpactTest";
			Hit_Foliage_Pine="ImpactTest";
			hitFoliage="ImpactTest";
			hitGlass="impactGlass";
			hitGlassArmored="ImpactTest";
			hitWood="ImpactTest";
			hitHay="ImpactTest";
			hitMetal="ImpactTest";
			hitMetalPlate="ImpactTest";
			hitBuilding="ImpactTest";
			hitPlastic="ImpactTest";
			hitRubber="ImpactTest";
			hitTyre="ImpactTest";
			hitConcrete="ImpactTest";
			hitMan="ImpactTest";
			hitGroundSoft="ImpactTest";
			hitGroundRed="ImpactTest";
			hitGroundHard="ImpactTest";
			hitWater="ImpactTest";
			hitVirtual="ImpactTest";

};
};
};

I'm very confused. The ontimer and before destroy already have _this with position https://community.bistudio.com/wiki/ParticleArray. Please provide more info and repro example

Yes, currently _this will only tell the script the particle position. It does not pass any other variables like the local particle that called it, the particles orientation, etc. I was asking if more info can be passed to the script, beyond what it currently does so the script can control the particle. This will allow for do more than simple operation to control variables.

A brief example would be roughly:
person shoots gun and hits a movable object like a car. This creates large spike in the car. if the car is then moved, I would want to use ontimer script to update the spikes position to move with the car. From my currently little scripting understanding, I can not do that with the ontimer script right now. It only gives me the spikes position.

looks like the parameter exists, it is called

forcedInitialOrientationDir[]

It also looks like it is just vector dir, vector up is just [0,0,1]

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Dec 1 2023, 1:53 PM
BIS_fnc_KK added a subscriber: BIS_fnc_KK.