Ask questions, discuss ideas, get answers
Machi
Posts: 14 Joined: Sat Dec 11, 2010 6:51 pm
Post
by Machi » Fri Dec 24, 2010 9:38 pm
Apache Thunder wrote: A quick look at your code and I spotted that you didn't have looping turned on for either of the emitters
Change it to this
Also how is the effect tied to the projectile? Instead of addtemplating it to the projectile, try this instead:
Code: Select all
ObjectTemplate.startEffectTemplate (name of your effect)
This is how my trail effect is coded for tank projectiles in my BFH mod. It works in all view modes:
Code: Select all
ObjectTemplate.create EffectBundle e_TankShell
ObjectTemplate.saveInSeparateFile 1
rem -------------------------------------
ObjectTemplate.addTemplate Em_ATRocketFire
rem -------------------------------------
ObjectTemplate.timeToLive CRD_NONE/-1/0/0
ObjectTemplate.create Emitter Em_ATRocketFire
ObjectTemplate.template Fx_ATRocketFire
ObjectTemplate.looping 1
ObjectTemplate.addEmitterSpeed 1
ObjectTemplate.emitterSpeedScale 1
ObjectTemplate.startProbability 1
ObjectTemplate.lodDistance 512
ObjectTemplate.delay CRD_NONE/0/0/0
ObjectTemplate.timeToLive CRD_NONE/1/0/0
ObjectTemplate.intensity CRD_NONE/30/0/0
ObjectTemplate.relativePositionInDof CRD_NONE/1/0/0
ObjectTemplate.relativePositionInUp CRD_NONE/0/0/0
ObjectTemplate.relativePositionInRight CRD_NONE/0/0/0
ObjectTemplate.positionalSpeedInDof CRD_NONE/-7/0/0
ObjectTemplate.positionalSpeedInUp CRD_NONE/0/0/0
ObjectTemplate.positionalSpeedInRight CRD_NONE/0/0/0
ObjectTemplate.rotationalSpeedInDof CRD_NONE/1/0/0
ObjectTemplate.rotationalSpeedInUp CRD_NONE/1/0/0
ObjectTemplate.rotationalSpeedInRight CRD_NONE/1/0/0
ObjectTemplate.startRotation CRD_NONE/1/0/0
ObjectTemplate.create SpriteParticle Fx_ATRocketFire
ObjectTemplate.cullRadiusScale 5
ObjectTemplate.texture e_fire4
ObjectTemplate.useMipMaps 1
rem ------------------------------------------
ObjectTemplate.timeToLive CRD_NONE/0.2/0.2/0
ObjectTemplate.size CRD_NONE/0.8/0/0
ObjectTemplate.gravityModifier CRD_NONE/0/0/0
ObjectTemplate.sizeOverTime 0/0.400006|21/0.789987|100/0.460005
ObjectTemplate.initRotation CRD_UNIFORM/1/180/1
ObjectTemplate.XYSizeRatio CRD_NONE/1/0/0
ObjectTemplate.srcBlendMode BMSourceAlpha
ObjectTemplate.destBlendMode BMOne
ObjectTemplate.rotationSpeed CRD_UNIFORM/200/300/1
ObjectTemplate.colorRGBAOverTime 0/255/255/255/0|4/255/255/221/56|15/255/255/128/212|55/255/195/67/208|100/255/128/0/204
Should make a good comparison to what your trying to do.
Hi!
All seemed good ideas, i tried them some moments ago but didnt worked
If you cant see the bomb, the effect does not start to appear...
Thanks all for the help and happy christmas!
Apache Thunder
Posts: 1213 Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:
Post
by Apache Thunder » Fri Dec 24, 2010 10:20 pm
Have you tried addtemplating dummy objects to the effect bundle?
Code: Select all
ObjectTemplate.create EffectBundle YourEffect
rem ---------------------------
ObjectTemplate.addTemplate EmptyObject
ObjectTemplate.setPosition 512/0/0
ObjectTemplate.addTemplate EmptyObject
ObjectTemplate.setPosition 512/0/512
ObjectTemplate.addTemplate EmptyObject
ObjectTemplate.setPosition 0/512/0
ObjectTemplate.create DummyObject EmptyObject
I found that the emitters don't emit if they are not on screen. After adding dummy objects to the effect bundle, it increasing the (bounding box) of the effect bundle thus making it emit even when off screen. Perhaps it will work for you in this case as well.
I have cameras in your head!
freddy
Posts: 1267 Joined: Sun Oct 18, 2009 4:58 pm
Post
by freddy » Sat Dec 25, 2010 12:18 am
i bet it would show if it had some networkinfo on the projectile
Apache Thunder
Posts: 1213 Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:
Post
by Apache Thunder » Sat Dec 25, 2010 3:31 am
The only projectiles that ever had network info was C4, Landmines, and grenades. I don't think it would help in this instance. It might cause more issues. I had network info on some koopa shells in my Mario kart mod (the version fired by the karts) and it caused unexplained CTDs every once and awhile.
So for vehicles, it's generally a bad idea putting network info on projectiles that it might fire. That and if the plane that fired the bomb dies before the bomb reaches the ground, the bomb might disappear (depending on how the timeAfterDeath is set). If the pco disappears before the networked projectile hits something, then the projectile will disappear along with the PCO that fired it)
I have cameras in your head!
freddy
Posts: 1267 Joined: Sun Oct 18, 2009 4:58 pm
Post
by freddy » Sat Dec 25, 2010 4:57 pm
your right, but it would work fine if it had been a PCO of some kind, maybe a invisible dummy tied to the bomb!?
Machi
Posts: 14 Joined: Sat Dec 11, 2010 6:51 pm
Post
by Machi » Mon Dec 27, 2010 2:05 am
Apache Thunder wrote: Have you tried addtemplating dummy objects to the effect bundle?
Code: Select all
ObjectTemplate.create EffectBundle YourEffect
rem ---------------------------
ObjectTemplate.addTemplate EmptyObject
ObjectTemplate.setPosition 512/0/0
ObjectTemplate.addTemplate EmptyObject
ObjectTemplate.setPosition 512/0/512
ObjectTemplate.addTemplate EmptyObject
ObjectTemplate.setPosition 0/512/0
ObjectTemplate.create DummyObject EmptyObject
I found that the emitters don't emit if they are not on screen. After adding dummy objects to the effect bundle, it increasing the (bounding box) of the effect bundle thus making it emit even when off screen. Perhaps it will work for you in this case as well.
Great! i have added the dummy objects just like you posted them and it WORKED PERFECTLY! So i must agree with you, if the emitter is not on screen, it does not emits particles.
Thanks everybody for the tips to make this work!
Apache Thunder
Posts: 1213 Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:
Post
by Apache Thunder » Mon Dec 27, 2010 5:14 am
Very nice! Glad I could help! I have added the "Solved" prefix to this thread.
I have cameras in your head!