1 (edited by immortalfray 2016-08-06 09:24:22)

Topic: Sticky option not working for particle effects *Fixed*

Im using UFE 1.71 and I cant seem to get particle effects to use the sticky option.  Even if i select it for a basic move the particle effect stays in place while the character moves around.

I can't find the root of the problem.  Ive tried two different builds and this feature is broken in both.  I checked ControlScript for anything i could find and it seems to be fine. 

[media]https://www.youtube.com/watch?v=3H77vV- … e=youtu.be[/media]

Any help on this issue would be great.

*Edit*

thanks to some help, the issue was fixed with two lines

http://i.imgur.com/n0HpMCv.png

Comment out the line that i did here and change the code inside of the if statement to look like this

Re: Sticky option not working for particle effects *Fixed*

Hi!

There's another post here in the forums that fixed this problem back in the days of 1.6, i tried it again, and it didn't work, so, i took all the fixed code for the particles in the old UFE and i put it back in the new one, works perfectly.

in ControlsScript.cs around line 1186 you'll find the "check particle effects" area, it's around 20 lines of code, change all the code that's there before "check applied forces" for this:


        foreach (MoveParticleEffect particleEffect in move.particleEffects){
            if (
                !particleEffect.casted && 
                particleEffect.particleEffect.prefab != null &&
                move.currentFrame >=  particleEffect.castingFrame
                ){
                particleEffect.casted = true;
                GameObject pTemp = (GameObject) Instantiate(particleEffect.particleEffect.prefab);
                
                Vector3 newPosition = myHitBoxesScript.GetPosition(particleEffect.particleEffect.bodyPart);
                newPosition.x += particleEffect.particleEffect.offSet.x * -mirror;
                newPosition.y += particleEffect.particleEffect.offSet.y;
                newPosition.z += particleEffect.particleEffect.offSet.z;
                pTemp.transform.position = newPosition;
                if (particleEffect.particleEffect.stick) pTemp.transform.parent = myHitBoxesScript.GetTransform(particleEffect.particleEffect.bodyPart);
     
                Destroy(pTemp, particleEffect.particleEffect.duration);
            }
        }
Me encontraste en un negro camino como un peregrino sin rumbo ni fe, pero la luz de tus ojos divinos cambió mi suerte por dicha y placer.

Re: Sticky option not working for particle effects *Fixed*

Thanks mate!  IIll give this a shot in the morning and let you know if it works out.

Re: Sticky option not working for particle effects *Fixed*

Thanks a bunch man that fixed the problem smile.  For anyone that wants to know you just need to fix two lines of code in ControlScript like StriderSpinel mentioned.

http://i.imgur.com/n0HpMCv.png

Comment out the line that i did here and change the code inside of the if statement to look like this

Re: Sticky option not working for particle effects *Fixed*

awesome, as i say, i don't know much about code, so i just threw everything back in.

XD

Me encontraste en un negro camino como un peregrino sin rumbo ni fe, pero la luz de tus ojos divinos cambió mi suerte por dicha y placer.