Page 1 of 1

Sticky sticky poo pop

Posted: Mon Apr 23, 2018 2:33 am
by takiwa
So, after all these years...has anyone come up with ANY ideas on how to make projectiles stick to collision meshes? I really want to implement magnetic mines to Warfront, but I can't see a way to do it, so I thought I'd check here and see if we could brainstorm the idea.

There has to be a way, we've figured out so much other stuff the game never intended...

Re: Sticky sticky poo pop

Posted: Mon Apr 23, 2018 3:26 am
by Diamondback
This might help: http://bfmods.com/viewtopic.php?f=23&t= ... cky#p12691

Apache describes two ways to make it work. One would be to use the isSticky command, providing that you remove the network info of the projectile (for expacks, for example).

The other involves creating a new material that can interact with your projectile so that the projectile sticks to the mesh. This is rather easy to do in the Game.rfa, in the materialmanagerdefine.con file I think. Just create a new material that has a high friction value so that the projectiles stick to the mesh.

Re: Sticky sticky poo pop

Posted: Mon Apr 23, 2018 5:28 am
by takiwa
haha, I KNEW I had seen that somewhere before, thanks for linking :)

Re: Sticky sticky poo pop

Posted: Tue Apr 24, 2018 5:47 am
by Swaffy

Code: Select all

ObjectTemplate.create Projectile StickyPackProjectile
rem ObjectTemplate.networkableInfo ProjectileInfo
ObjectTemplate.geometry DemoSticky
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.setHasMobilePhysics 1
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.setHasPointPhysics 0
ObjectTemplate.hasCollisionEffect 0
ObjectTemplate.invisibleAtEndEffect 1
ObjectTemplate.useMMOnEndEffect 1
ObjectTemplate.detonateOnWaterCollision 1
ObjectTemplate.hasArmor 1
ObjectTemplate.hitPoints 9999
ObjectTemplate.maxHitPoints 9999
ObjectTemplate.explosionDamage 0
ObjectTemplate.timeToLive CRD_NONE/10/0/0
ObjectTemplate.dieAfterColl 0
ObjectTemplate.radius 10
ObjectTemplate.damageType 1
ObjectTemplate.material 70
ObjectTemplate.material2 306
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.endEffectTemplate e_ExplGranade
ObjectTemplate.noFFSound 1
... then this at the bottom
ObjectTemplate.gravityModifier 0.5
ObjectTemplate.isSticky 1

- - -

You may wanna try to give it less mass (since it's transfered to parent vehicle and moves it) and make use of GravityModifier
ObjectTemplate.mass [small number]
ObjectTemplate.gravityModifier [change rate of drop]

Re: Sticky sticky poo pop

Posted: Wed Apr 25, 2018 3:05 am
by Diamondback
Swaffy wrote:

Code: Select all

ObjectTemplate.create Projectile StickyPackProjectile
rem ObjectTemplate.networkableInfo ProjectileInfo
ObjectTemplate.geometry DemoSticky
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.setHasMobilePhysics 1
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.setHasPointPhysics 0
ObjectTemplate.hasCollisionEffect 0
ObjectTemplate.invisibleAtEndEffect 1
ObjectTemplate.useMMOnEndEffect 1
ObjectTemplate.detonateOnWaterCollision 1
ObjectTemplate.hasArmor 1
ObjectTemplate.hitPoints 9999
ObjectTemplate.maxHitPoints 9999
ObjectTemplate.explosionDamage 0
ObjectTemplate.timeToLive CRD_NONE/10/0/0
ObjectTemplate.dieAfterColl 0
ObjectTemplate.radius 10
ObjectTemplate.damageType 1
ObjectTemplate.material 70
ObjectTemplate.material2 306
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.endEffectTemplate e_ExplGranade
ObjectTemplate.noFFSound 1
... then this at the bottom
ObjectTemplate.gravityModifier 0.5
ObjectTemplate.isSticky 1

- - -

You may wanna try to give it less mass (since it's transfered to parent vehicle and moves it) and make use of GravityModifier
ObjectTemplate.mass [small number]
ObjectTemplate.gravityModifier [change rate of drop]
This method uses the timed projectile explosion procedure right? Meaning you cannot detonate the projectile voluntarily.

Re: Sticky sticky poo pop

Posted: Wed Apr 25, 2018 7:41 pm
by freddy
Im guessing its timed, since there is no network.info conection you cant detonate it after you put it out.

Re: Sticky sticky poo pop

Posted: Thu Apr 26, 2018 2:25 am
by Swaffy
freddy wrote:Im guessing its timed, since there is no network.info conection you cant detonate it after you put it out.
Right, if I recall the detonator stops working once you take out the networking. And using the networking on the timed bomb (with sticky) causes a crash.

Re: Sticky sticky poo pop

Posted: Fri Apr 27, 2018 11:55 am
by takiwa
Most magnetic mines of WWII were timed, tho, so this doesn't pose a problem...