Page 1 of 1

console movement command

Posted: Sat Oct 04, 2014 7:16 pm
by mjs warlord
i cant move fast enough in level 6 to get round trap doors.

can somebody give an example of what to type into the console so i can jump forward 2 spaces.

Re: console movement command

Posted: Sun Oct 05, 2014 1:02 am
by Isaac
What you most likely need to do is lose some weight. There is no situation in the official game that you cannot access ~if you are supposed to. If you absolutely cannot manage to do a thing... it's likely that you are not supposed to do it the way you are trying to. If any of your party members show the snail icon on their portrait, then your party (as a whole) is slowed, and that can indeed make certain puzzles impossible. If that's the case, lose the weight.

If you are just playing around and it's not a serious session, then it's possible to teleport anywhere with the party:setPosition() function... but you can break game logic that way, and I wouldn't recommend using that as a go-to tactic to bypass puzzle challenges.

party:setPosition(x, y, facing, level)
Instantly moves the party to given location in the dungeon.

Re: console movement command

Posted: Sun Oct 05, 2014 9:51 am
by mjs warlord
from the position i am in i want to move forwards 2 spaces but when i typed the line as shown to my first reply i get all sorts of syntax errors.

does anyone know what i am doing wrong

Re: console movement command

Posted: Sun Oct 05, 2014 3:42 pm
by Dr.Disaster
You need to enter the precise coordinates for the variables "x, y, facing, level" to make this command work. Activate the option "debuginfo" in grimrock.cfg to see your current coordinates in the left hand bottom of the screen. Then add/reduce accordingly.

Re: console movement command

Posted: Sun Oct 05, 2014 4:19 pm
by mjs warlord
thanks dr.disaster i done it.

Re: console movement command

Posted: Mon Oct 06, 2014 11:30 am
by Komag
well, you could code it as (party.x + 2) or (party.y - 2) depending on your facing

Re: console movement command

Posted: Thu Nov 27, 2014 7:47 pm
by BarryBGB
Komag wrote:well, you could code it as (party.x + 2) or (party.y - 2) depending on your facing
I have tried over and over in grimrock 2 to move my party and it always fails.
I type party:setPosition(25,7,0,16) and it always comes back with the error:
:1: bad argument #5 to 'setPosition' (number expected, got nil)

I remember I used to be able to do this in Grimrock I but not in 2.
Any sugestions?

Re: console movement command

Posted: Thu Nov 27, 2014 8:32 pm
by minmay
http://www.grimrock.net/modding/scripti ... GameObject
In Grimrock 2, objects have elevation, so setPosition needs five arguments.

Re: console movement command

Posted: Thu Nov 27, 2014 11:25 pm
by BarryBGB
minmay wrote:http://www.grimrock.net/modding/scripti ... GameObject
In Grimrock 2, objects have elevation, so setPosition needs five arguments.
Ok, so I have set debug to true, but it doesn't show a 5th number. How can I find the elevation?