[CSM] Help > Landmines > Spawning

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

[CSM] Help > Landmines > Spawning

Post 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?
Last edited by Swaffy on Tue Nov 02, 2010 8:30 pm, edited 1 time in total.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
anselmus
Posts: 82
Joined: Sun Oct 18, 2009 6:42 pm

Re: [CSM] Help > Landmines > Spawning

Post 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.
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: [CSM] Help > Landmines > Spawning

Post 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...
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: [CSM] Help > Landmines > Spawning

Post 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
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: [CSM] Help > Landmines > Spawning

Post 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?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: [CSM] Help > Landmines > Spawning

Post 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
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: [CSM] Help > Landmines > Spawning

Post by Swaffy »

That's what I was thinking. I didn't think two variables would work for a "Create" function.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply