pco engine auto start. pivot?

Ask questions, discuss ideas, get answers
Post Reply
Shrooms
Posts: 70
Joined: Wed Aug 11, 2010 12:35 am

pco engine auto start. pivot?

Post by Shrooms »

[solved] ObjectTemplate.setEngineType c_ETRocket

I'm making a PCO move on it's own. A moving platform. This will be a CSM. I have a problem with the PCO starting once its reached the criticalDamage number then repaired. When its repaired to full health it won't start moving again. I've tried ObjectTemplate.active m10engine and it doesn't work. Is it possible to have a tweak in physics.con to automatically start the pco without a player occupying it?
Last edited by Shrooms on Sun Jan 27, 2013 10:29 am, edited 1 time in total.
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: pco engine auto start?

Post by Vilespring »

I do not know the answer myself, which I do want to hear, but "ObjectTemplate.active M10Engine" just makes the template active for editing, not activation.
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"
Shrooms
Posts: 70
Joined: Wed Aug 11, 2010 12:35 am

Re: pco engine auto start?

Post by Shrooms »

I used it in objectspawntemplates for the vehicle to move without a player in it. If I allow a person to press E the vehicle moves. Though it defeats the purpose i'm making.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: pco engine auto start?

Post by Swaffy »

I remember forgetting to add a line to my Willy Nitro's rocket engine ... the rockets shot off and the thing flew off the map.

So it's possible.

Try removing the line "setAutomaticReset" and see what happens. If that doesn't work, try removing "setInputToRoll" and see if that does it. I know there's a line that you can remove and the vehicle drives off without a player, I just don't completely remember what I did. I would do some of my own testing, but I can't start up my mod until I finish some 3D models for my weapon kits.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Shrooms
Posts: 70
Joined: Wed Aug 11, 2010 12:35 am

Re: pco engine auto start?

Post by Shrooms »

I have ObjectTemplate.setEngineType c_ETRocket which has the vehicle move on its own. The idea I have in mind seemingly is not possible however.
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: pco engine auto start?

Post by Senshi »

Your only chance is to try the different possible engine types. Might be one of them works for you.

Shrooms already suggested the c_ETRocket, more can be found here:
http://bfmods.com/mdt/scripting/ObjectT ... eType.html

And you completely misunderstand the point of "ObjectTemplate.active M10Engine". I suggest reading the MDT on unknown values:
http://bfmods.com/mdt/scripting/ObjectT ... ctive.html

Honestly, it never hurts to read a bit in the MDT. A lot of info for starters and intermediate modders.
Shrooms
Posts: 70
Joined: Wed Aug 11, 2010 12:35 am

Re: pco engine auto start?

Post by Shrooms »

The active command works I don't know why or how. The PCO didn't move anymore after respawning. I don't know of an alternative to make it mobile. It just works.I've tried different engine types without luck. though I appreciate your information. I"ll look into methods of changing this concept.
Shrooms
Posts: 70
Joined: Wed Aug 11, 2010 12:35 am

Re: pco engine auto start. pivot?

Post by Shrooms »

ObjectTemplate.hasMobilePhysics 1 makes the cable car fly across the map. I want to make the hull not tilt when it climbs vertical. It moves like the sengoku carts which is cool though I'm slumped on stopping the tilting.



Image

Code: Select all

Objects.con
rem *** CableCarComplex ***
ObjectTemplate.create Bundle M_CableCarComplex
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate lodM_CableCarCockpit
ObjectTemplate.addTemplate M_CableCarCamera
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.addTemplate M_CableCarEntry
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.addTemplate M_CableCarEngine
ObjectTemplate.addTemplate M_CableCar_slideR
ObjectTemplate.setPosition 0/-0.24/0
ObjectTemplate.addTemplate M_CableCar_hull
ObjectTemplate.setPosition -0.02/-6.9/0
rem ObjectTemplate.setRotation 180/0/0
rem -------------------------------------

ObjectTemplate.create Bundle M_CableCar_slideR
ObjectTemplate.geometry M_cablecar_slideR
ObjectTemplate.hasCollisionPhysics 1

rem *** M_CableCar_hull ***
ObjectTemplate.create RotationalBundle M_CableCar_hull
ObjectTemplate.setNetworkableInfo M_CableCarTurretInfo
ObjectTemplate.geometry M_CableCar_hull
rem ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
rem ObjectTemplate.addTemplate M_CableCar_AOR
rem ObjectTemplate.setPosition -0.02/-6.898/0
rem ObjectTemplate.SetRotation 0/180/0
rem -------------------------------------
ObjectTemplate.setMinRotation 0/0/0
ObjectTemplate.setMaxRotation 0/0/0
ObjectTemplate.setMaxSpeed 0/0/0
ObjectTemplate.setAcceleration 0/0/0
ObjectTemplate.setInputToYaw c_PIYaw
ObjectTemplate.setAutomaticReset 1
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: pco engine auto start. pivot?

Post by Swaffy »

From what I know, if it doesn't have "Mobilephysics 1" then it will sit still like a static object.

About the tilt, you can try putting the wheels in a "u" shape (or a "v" shape) so that the side wheels touch when the cart goes up/down a hill. It seems like you currently have them in a wide "n" shape which doesn't act well with hills. And position them somewhat close together because a wider wheel base will only try to tilt the car on hills. Also, try to soften the suspension (springs).
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply