Stop Camera Movement?
-
- Smart Inserter
- Posts: 1847
- Joined: Sun Feb 23, 2014 3:37 pm
- Contact:
Stop Camera Movement?
I'm not sure where a post like this belongs, so feel free to move it if it's not meant to be here.
I'm trying to find a way of making the player move independently of the camera. For example, what I want to do is make the camera stay still and have the player move off the screen. Does anyone know if this is possible with a console command or mod? (I know that the opposite is possible with game.player.character = nil)
I'm trying to find a way of making the player move independently of the camera. For example, what I want to do is make the camera stay still and have the player move off the screen. Does anyone know if this is possible with a console command or mod? (I know that the opposite is possible with game.player.character = nil)
Re: Stop Camera Movement?
I've no idea, but I'm curious/puzzled why you'd want to do this?
Re: Stop Camera Movement?
Here is a proof-of-concept mod that manipulates character position.
How to use:
Issues:
- No collision detection
- No animation
How to use:
Code: Select all
remote.call("AutoMove", "north")
game.player.character = nil
remote.call("AutoMove", "south")
remote.call("AutoMove", "east")
remote.call("AutoMove", "west")
remote.call("AutoMove", "speed", 5)
remote.call("AutoMove", "stop")
remote.call("AutoMove", "center")
- No collision detection
- No animation
- Attachments
-
- AutoMove_0.1.0.zip
- (797 Bytes) Downloaded 101 times
-
- Smart Inserter
- Posts: 1847
- Joined: Sun Feb 23, 2014 3:37 pm
- Contact:
Re: Stop Camera Movement?
Any way to keep animation? I guess more specifically what I want is to keep the camera on one spot and control the player as normal.(including being able to move it off screen)
- Xterminator
- Filter Inserter
- Posts: 981
- Joined: Sun Jun 15, 2014 4:49 pm
- Contact:
Re: Stop Camera Movement?
Methinks Fish is going to be producing some sort of machinima made in Factorio and needs to be able to get views with the player not on screen.Xterminator wrote:Dare I ask why you want to be able to do this? :p
Re: Stop Camera Movement?
Seems like it has been only mentioned in changelog (0.8.0), but it is possible to read/write character states.
Example usage I had mod that copy/paste my drivingstate to other characters ontick.
I'm not sure if it is possible to read god controller state. since it has no charracter.
for god mode, you could possibly set up textfield in corner and use it to read keyport inputs.
Setting walkingstate.Its a table, but I'm typing this with smartphone that has no wavy brackets in key layout.
Example usage I had mod that copy/paste my drivingstate to other characters ontick.
I'm not sure if it is possible to read god controller state. since it has no charracter.
for god mode, you could possibly set up textfield in corner and use it to read keyport inputs.
Setting walkingstate.
Code: Select all
character.walkingstate = ( walking = boolean, direction = number )
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: Stop Camera Movement?
Take a look at the trailer mod. There were several lua api calls added just to make things like this possible in trailer.silman wrote:Methinks Fish is going to be producing some sort of machinima made in Factorio and needs to be able to get views with the player not on screen.Xterminator wrote:Dare I ask why you want to be able to do this? :p
-
- Smart Inserter
- Posts: 1847
- Joined: Sun Feb 23, 2014 3:37 pm
- Contact:
Re: Stop Camera Movement?
Oh wow, I forgot about the trailer mod! I'll definitely look into that then, I think that'll definitely be easier than how I'm doing it now..
Re: Stop Camera Movement?
Thanks, that solved animation and collision detection!rk84 wrote: Setting walkingstate.Code: Select all
character.walkingstate = { walking = boolean, direction = number }
Textfield input is really awkward. I went with mouse input and an onscreen direction pad.
Updated mod:
- Attachments
-
- AutoMove_0.2.0.zip
- (1.09 KiB) Downloaded 100 times
Re: Stop Camera Movement?
I made rival mod with textfieldDaveMcW wrote:Textfield input is really awkward. I went with mouse input and an onscreen direction pad.
Clicking the textfield toggle mode.
I made same kind of system as in your pad.
Code: Select all
-- Keyport inputs: S is stop. Others are directional inputs that can toggle walking.
-- QWE
-- ASD
-- ZXC
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Re: Stop Camera Movement?
Shots fired!rk84 wrote:I made rival mod with textfield
-
- Smart Inserter
- Posts: 1847
- Joined: Sun Feb 23, 2014 3:37 pm
- Contact:
Re: Stop Camera Movement?
Beautiful! This works well, thank you! To both of you.rk84 wrote:I made rival mod with textfieldDaveMcW wrote:Textfield input is really awkward. I went with mouse input and an onscreen direction pad.
Clicking the textfield toggle mode.
I made same kind of system as in your pad.Code: Select all
-- Keyport inputs: S is stop. Others are directional inputs that can toggle walking. -- QWE -- ASD -- ZXC