Editing object setPos mid-game?

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

Editing object setPos mid-game?

Post by Swaffy »

THe situation: I'm in the process of lining up a gun to the middle of the screen for 3D sights. But it is a hassle to keep starting up the game, seeing the sight's position on the screen, exiting to edit the coordinates, and repeating many times over.

Is there a way I can edit cordinates mid-game without leaving? I heard something about the BF1942 Debugger allowing the modder to do that.
Last edited by Swaffy on Mon Jul 18, 2016 3:26 am, edited 1 time in total.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Edit coordinates mid-game

Post by Apache Thunder »

In the debugger, you can use the Console to edit existing objects and create new ones too. For what you want to do, the ObjectTemplate.active command will be most useful. The Console will accept any command that you have seen in con files provided that you have the appropriate object active via the active command.

Any changes you do to a soldier weapon for example may not take effect until you die and respawn as in most cases a spawned object won't update until it is respawned or a new one is spawned.
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Edit coordinates mid-game

Post by Swaffy »

Gonna bump this old thread of mine to reduce clutter (which might not matter anyway, but meh). My question is still relevant.

In this case I want to change the setPosition of my AichivalCamera which is the 2nd template under AichivalComplex. How can I move the camera while ingame using the debugger? I tried some basic stuff but none seemed to work. And just to make sure the debugger was working I active the Colt and changed soldierCameraPosition which worked fine. But how do I change the position of the camera on my plane by moving the existing camera?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply