Page 1 of 1

S&D

Posted: Fri Mar 25, 2011 11:12 pm
by motoko
A friend of mine came up with the idea to run a Search and Destroy-like mod for an event that will be on his event server. The problem is, I suck at CSM (and so does he apparently). When I'm making the time bomb, would it be possible to create a PCO and add timetolive, or am I over-thinking this? Also, how would you get it to be deactivated?

Re: S&D

Posted: Sun Mar 27, 2011 4:09 am
by Dennis|8749236
U can set a mine, the mine with timetolve, for example 10 seconds, and then after 10 seconds, it will explode, and if u use wrench on it, it will be picked up..

Code: Select all

ObjectTemplate.create Projectile TimedBomb
ObjectTemplate.networkableInfo ProjectileInfo
ObjectTemplate.geometry Landmine
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.setHasMobilePhysics 1
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.setHasResponsePhysics 1
ObjectTemplate.setHasPointPhysics 0
ObjectTemplate.hasCollisionEffect 0
ObjectTemplate.invisibleAtEndEffect 1
rem *** Landmines explodes after 120 seconds, if not detonated by hand first.
ObjectTemplate.timeToLive CRD_NONE/30/0/0
ObjectTemplate.dieAfterColl 0
ObjectTemplate.radius 25
ObjectTemplate.ForceOnExplosion 30
rem ObjectTemplate.explodeNearEnemyDistance 3
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.mass 130
ObjectTemplate.material 305
ObjectTemplate.material2 304
ObjectTemplate.damageType 4
ObjectTemplate.endEffectTemplate BombSmall_Expl
beginrem
ObjectTemplate.fadeOnDist 1
ObjectTemplate.minDist 2
ObjectTemplate.maxDist 20
ObjectTemplate.minDistAlpha 5
ObjectTemplate.maxDistAlpha 25
endrem
ObjectTemplate.noFFSound 1
ObjectTemplate.addToProjectileList 1
ObjectTemplate.projectileType 1

Re: S&D

Posted: Tue Mar 29, 2011 7:29 pm
by anselmus
It is even simple to do.
The question remains: how to know that mine is on the ground?
It is possible to be fired any sound that disappears if the mine explode or be removed? Or, an icon appears when the mine is on the ground, on the minimap?

Re: S&D

Posted: Tue Mar 29, 2011 10:48 pm
by Dennis|8749236
when u r getting close to the mines, u will see a mine indication icon..
and my code is depend on the mine that in original BF1942..
so it should have a icon when u get close to it...
read this:
http://dzn.org.pl/mdt/scripting/ObjectT ... .shtm.html

Re: S&D

Posted: Thu Mar 31, 2011 8:07 pm
by anselmus
I'm using a expack, because when it explodes kills, I put in expack siren sound, but the sound disappears if you select the detonator or switch to a weapon.

Re: S&D

Posted: Fri Apr 01, 2011 3:49 pm
by Dennis|8749236
yes, that is ture, you cannot swich the weapon or else the sound will disappear, try to add sound script to a effecta and bound that effect to your handfirearm..
when you fire the weapon, the effects still working, and if you swich the weapon, the effect sound will not disappear.