Magnents?

Ask questions, discuss ideas, get answers
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Magnents?

Post by Swaffy »

I think it would be safer to use -2000 or -1000 for the explosion force, -9999 would be overkill.

[Edit] I found the code.

Code: Select all

rem *** BlackHolemisile ***
ObjectTemplate.create Projectile BlackHolemisile
ObjectTemplate.createNotInGrid 1
ObjectTemplate.loadSoundScript ../air/common/Sounds/Bomb.ssc
ObjectTemplate.geometry Big_Bomb_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.timeToLive CRD_NONE/6/0/0
ObjectTemplate.damageType 1
ObjectTemplate.material 263
ObjectTemplate.material2 264
ObjectTemplate.radius 30
ObjectTemplate.stopAtEndEffect 1
ObjectTemplate.dieAfterColl 0
ObjectTemplate.hasCollisionEffect 1
ObjectTemplate.mass 250
ObjectTemplate.drag 0.08
ObjectTemplate.setHasPointPhysics 0
rem ObjectTemplate.YModOnExplosion 400.0
rem bjectTemplate.ProximityFusePrimer 0.1
ObjectTemplate.ForceOnExplosion -20000
ObjectTemplate.hasCollisionEffect 1
ObjectTemplate.addTemplate e_warptrail2
ObjectTemplate.setRotation 90/0/90
ObjectTemplate.addTemplate e_warptrail222
ObjectTemplate.setRotation -90/0/90
rem -------------------------------------------------
ObjectTemplate.addTemplate Bomb_wing
ObjectTemplate.setPosition 0/0/-0.5
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0/0/-4
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0/0/-1
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0/0.3/-4
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0/-0.3/-4
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition 0.3/0/-4
ObjectTemplate.addTemplate Defgungeo
ObjectTemplate.setPosition -0.3/0/-4
ObjectTemplate.addTemplate Bomb_wing
ObjectTemplate.setPosition 0/0/-0.5
ObjectTemplate.setRotation 0/0/-90
rem -------------------------------------------------
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Magnents?

Post by Vilespring »

I'm just trying to get it to move to see if the concept works. If the thing disappears, well, I'm getting some were XD
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Magnents?

Post by Swaffy »

Okay. Try taking the code from your ordinary shells and begin with the blast radius and the blast pressure (forceOnExplosion) code to see if that works. If it does, then work with the code to make it what you want.

[EDIT] Wait, if you said the target object disappeared then try to reduce the explosion force. If it's disappearing, it might just be traveling too fast. Keep halving the explosion force number until you get close to what you want.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Magnents?

Post by Vilespring »

That is right. I just cannot get it to move. :x
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Magnents?

Post by Swaffy »

Double-check this line of code:

Objects.rfa/Objects/Soldiers/Common/CommonSoldierData.inc
ObjectTemplate.explosionForceMax 200
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Magnents?

Post by Vilespring »

I'm trying to move vehicles, not infantry. The vehicles are making shuffle sounds, then explode, because they take some damage somehow.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Magnents?

Post by freddy »

the material2 must be able to hurt the vehicle even the tinyest amount or nothing happens, this example code works on planes and jeeps but not on tanks (regular bf42). i used the coltprojectilematerial2. you have to find or make a own material that works on the vehicles you want to use it on.

example code

Code: Select all

ObjectTemplate.Active Thompson
ObjectTemplate.magSize -1
ObjectTemplate.reloadtime 0

Code: Select all

ObjectTemplate.Active ThomsonProjectile
ObjectTemplate.ForceOnExplosion -200
ObjectTemplate.material 70
ObjectTemplate.material2 214
ObjectTemplate.radius 15
ObjectTemplate.damageType 1
the vehicles is pulled to the center of the explosion so you cant shot straight on the target, you must aim where you want it to move
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Magnents?

Post by Vilespring »

Have you tested this code? I tried it and it does not work.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Magnents?

Post by Swaffy »

freddy wrote:the vehicles is pulled to the center of the explosion so you cant shot straight on the target, you must aim where you want it to move
But if it explodes mid-air next to the vehicle (without touching), won't it pull the vehicle?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Magnents?

Post by freddy »

Vilespring wrote:Have you tested this code? I tried it and it does not work.
did you run it in vanilla bf42?

extended test code

Code: Select all

ObjectTemplate.Active Thompson
ObjectTemplate.magSize -1
ObjectTemplate.reloadtime 0
ObjectTemplate.setTracerTemplate AA_Allies_Projectile CRD_NONE/1/0/0

Code: Select all

ObjectTemplate.Active ThomsonProjectile
ObjectTemplate.ForceOnExplosion -999
ObjectTemplate.material 70
ObjectTemplate.material2 214
ObjectTemplate.radius 15
ObjectTemplate.damageType 1

ObjectTemplate.Active AA_Allies_Projectile
ObjectTemplate.ForceOnExplosion -999
ObjectTemplate.material 70
ObjectTemplate.material2 214
looks like this
Post Reply