Page 1 of 1

[CSM] Help > Landmines > Spawning

Posted: Tue Oct 12, 2010 4:30 am
by Swaffy
Two different questions in one topic, both relating to mines:


I would like to find a way to have landmines spawn as an object on the map instead of a player throwing down a projectile template of a landmine. So I'm guessing it should be a PCO or SimpleObject. How can I go about in doing this? Is it possible?

Another thing I would like to ask: are anti-personnel mines possible in BF1942?

Re: [CSM] Help > Landmines > Spawning

Posted: Tue Oct 19, 2010 12:25 am
by anselmus
There is a trick, but you have to put on the map at last and put the OS and OST already with the coordinates of where you want to mine .. please have the MDT for that.

OBJECTSPAWNTEMPLATE.CON
rem -----------------------------------------
rem --- Projectile ---
rem -----------------------------------------
ObjectTemplate.create ObjectSpawner Projectile
ObjectTemplate.active ObjectSpawner Projectile LandmineProjectile

ObjectTemplate.create ObjectSpawner Projectile LandmineProjectile
ObjectTemplate.networkableInfo ProjectileInfo
ObjectTemplate.geometry Landmine
ObjectTemplate.setHasMobilePhysics 1
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.setHasCollisionPhysics 1

OBJECTSPAWN.CON

Object.create Projectile LandmineProjectileSpawner
Object.absolutePosition 000/000/000 ( coordinates here. )
Object.rotation 0/0.00/0.00

However, the mines are vibrating on the ground.

Re: [CSM] Help > Landmines > Spawning

Posted: Tue Oct 19, 2010 12:50 am
by fo0k
For AP mines you could add template a damage bubble to the player.. it would only hurt the mine object.. and when the mine object dies (would happen in a split second) it explodes with huge effects and sends shards of deadly standardmesh ~ matid99 into the heart of the victim...

Re: [CSM] Help > Landmines > Spawning

Posted: Wed Oct 20, 2010 3:54 pm
by Apache Thunder
Buried on page two in the general tutorials section, I made a in depth tutorial on how to make working AP Mines:

CSM - How to make working APMines with credited kills...

Hopefully that should show you how to do it. :D

Re: [CSM] Help > Landmines > Spawning

Posted: Wed Jan 12, 2011 8:38 am
by Swaffy
Please forgive me for bumping an old topic.

If this could work with the Landmine projectile [and I'm sure it does], is it possible for it to work with [for example] a Katyusha rocket?
Imagine an artillery strike originating from the side of the map firing rockets into a large base every 60 seconds.

Would it be set up like this?


OBJECTSPAWNTEMPLATE.CON
rem -----------------------------------------
rem --- Projectile ---
rem -----------------------------------------
ObjectTemplate.create ObjectSpawner Projectile
ObjectTemplate.active ObjectSpawner Projectile KatyushaRocket

ObjectTemplate.create ObjectSpawner Projectile KatyushaRocket
ObjectTemplate.networkableInfo ProjectileInfo
ObjectTemplate.geometry r_rocket_m1
ObjectTemplate.setHasMobilePhysics 1
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.setHasCollisionPhysics 1

OBJECTSPAWN.CON

Object.create Projectile KatyushaRocketSpawner
Object.absolutePosition 000/000/000 ( coordinates here. )
Object.rotation 0/0.00/0.00

However, the mines are vibrating on the ground.


It seems to me that "KatyushaRocketSpawner" in ObjectsSpawn.con is not attached to anything in the ObjectsSpawnTemplate.con area. How does the scripting work?

Re: [CSM] Help > Landmines > Spawning

Posted: Sat Jan 15, 2011 7:35 pm
by Apache Thunder
Swaffy wrote: OBJECTSPAWNTEMPLATE.CON
rem -----------------------------------------
rem --- Projectile ---
rem -----------------------------------------
ObjectTemplate.create ObjectSpawner Projectile
ObjectTemplate.active ObjectSpawner Projectile KatyushaRocket

ObjectTemplate.create ObjectSpawner Projectile KatyushaRocket
ObjectTemplate.networkableInfo ProjectileInfo
ObjectTemplate.geometry r_rocket_m1
ObjectTemplate.setHasMobilePhysics 1
ObjectTemplate.hasDynamicShadow 1
ObjectTemplate.setHasCollisionPhysics 1

OBJECTSPAWN.CON

Object.create Projectile KatyushaRocketSpawner
Object.absolutePosition 000/000/000 ( coordinates here. )
Object.rotation 0/0.00/0.00

However, the mines are vibrating on the ground.


It seems to me that "KatyushaRocketSpawner" in ObjectsSpawn.con is not attached to anything in the ObjectsSpawnTemplate.con area. How does the scripting work?
How does any of that even work? The active command only accepts one command:

Code: Select all

ObjectTemplate.active (name of object)
Same goes for the object.create command and the ObjectTemplate.create command only accepts two. The object class and the name of the object. Adding more variables then it accepts will nullify the entire command.

As for the "vibrating" on the ground issue. You will need to add this command to the PCO since small objects are too buggy to have springs:

Code: Select all

ObjectTemplate.inertiaModifier 0/0/0

Re: [CSM] Help > Landmines > Spawning

Posted: Sat Jan 15, 2011 7:49 pm
by Swaffy
That's what I was thinking. I didn't think two variables would work for a "Create" function.