Shooting PCOs

Ask questions, discuss ideas, get answers
Post Reply
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Shooting PCOs

Post by BotHunter »

Hey all! Is there anyway to shoot a PCO without automatically being inside of it? (Please tell me if you need a better explenation :) )

Thanks!

EDIT:
Also Without using Spawners. :D
Walk quietly and carry a sniper rifle
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Shooting PCOs

Post by Vilespring »

ObjectTemplate.autofire 1
it needs the initial fire to start it.
This code is not very good, probably due to the fact it is not needed so wasn't worked on. I have tried and tried to get this code to work on my "auto gun", a wespe artillery where all that has to be done is changing where it aims. It will only fire 3 shots before it stops, and it shoots, even when it is dead!
the gun will keep trying to shoot, even with overheat. It needs to be started, and doesn't last long enough. It doesn't work well, but it's there.
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
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Shooting PCOs

Post by BotHunter »

Ahh. I think I was not very clear. What I meant was when you shoot a PCO As a projectile, It automatically puts you inside of it. Like the Wasserfall rocket. So I was wondering if there was a way I could keep it from doing that. :)
Walk quietly and carry a sniper rifle
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Shooting PCOs

Post by Vilespring »

make a projectile, and add a spawner to the projectile. Here is the script to my "air mail" cannon, a priest that shoots shermans!!! :lol: :lol:

Code: Select all


rem *** airmailCannon ***
ObjectTemplate.create FireArms airmailCannon
ObjectTemplate.setNetworkableInfo TankFireArmInfo
ObjectTemplate.loadSoundScript Sounds/PriestCannon.ssc
ObjectTemplate.geometry Priest_Cannon2_M1
ObjectTemplate.aiTemplate ShermanMainGun
rem -------------------------------------
ObjectTemplate.addTemplate e_MuzzPriest
ObjectTemplate.setPosition 0/0/0.5
ObjectTemplate.setRotation -179.999/0/0
rem -------------------------------------
ObjectTemplate.projectileTemplate airmailProjectile
ObjectTemplate.projectilePosition 0/0/3
ObjectTemplate.magSize 30
ObjectTemplate.numOfMag 1
ObjectTemplate.velocity 100
ObjectTemplate.autoReload 1
ObjectTemplate.reloadtime 5
ObjectTemplate.roundOfFire 0.2
ObjectTemplate.fireingForce 60
ObjectTemplate.recoilSpeed 10
ObjectTemplate.recoilSize 3


rem *** airmailProjectile ***
ObjectTemplate.create Projectile airmailProjectile
ObjectTemplate.createNotInGrid 1
ObjectTemplate.loadSoundScript ../../Common/Sounds/BigProjectile.ssc
ObjectTemplate.geometry projectile_m1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.timeToLive CRD_NONE/0.1/0/0
ObjectTemplate.damageType 1
ObjectTemplate.material 240
ObjectTemplate.material2 201
ObjectTemplate.radius 15
ObjectTemplate.hasCollisionEffect 1
ObjectTemplate.addTemplate e_PanzShootTrail
ObjectTemplate.addTemplate airmailtankSpawner

rem *** airmailtankSpawner ***
ObjectTemplate.create ObjectSpawner airmailtankSpawner
ObjectTemplate.setObjectTemplate 1 Sherman
ObjectTemplate.setObjectTemplate 2 Sherman
ObjectTemplate.holdObject 1
ObjectTemplate.minSpawnDelay 20
ObjectTemplate.maxSpawnDelay 20
ObjectTemplate.TimeToLive 30
ObjectTemplate.Distance 20
ObjectTemplate.spawnOffset 0/0/0
ObjectTemplate.team 1
ObjectTemplate.MaxNrOfObjectSpawned 3
ObjectTemplate.damageWhenLost 10
SENDING AIR MAIL!!! :lol: :lol:
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
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Shooting PCOs

Post by BotHunter »

Thanks!
Walk quietly and carry a sniper rifle
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Shooting PCOs

Post by Vilespring »

Welcome! :)
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: Shooting PCOs

Post by Swaffy »

Oh yes, holdObject is the key code, in the spawner template. So instead of the projectile spawning PCOs and them dropping to the ground, the PCO is "glued" to the projectile until a player enters it and drives forward.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Shooting PCOs

Post by BotHunter »

Well at first I had problems getting the spawner thing to work. But I figured that out.
Walk quietly and carry a sniper rifle
Post Reply