Page 1 of 1

Shooting PCOs

Posted: Sat Oct 19, 2013 4:08 am
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

Re: Shooting PCOs

Posted: Sat Oct 19, 2013 4:33 am
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.

Re: Shooting PCOs

Posted: Sat Oct 19, 2013 5:02 am
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. :)

Re: Shooting PCOs

Posted: Sun Oct 20, 2013 9:46 pm
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:

Re: Shooting PCOs

Posted: Mon Oct 21, 2013 12:49 am
by BotHunter
Thanks!

Re: Shooting PCOs

Posted: Mon Oct 21, 2013 1:07 am
by Vilespring
Welcome! :)

Re: Shooting PCOs

Posted: Tue Oct 22, 2013 5:43 am
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.

Re: Shooting PCOs

Posted: Tue Oct 22, 2013 4:13 pm
by BotHunter
Well at first I had problems getting the spawner thing to work. But I figured that out.