Keyboard controlled camera - can I get it to ignore walkable areas?

Started by Technocrat, Sun 09/11/2008 01:15:54

Previous topic - Next topic

Technocrat

The situation I've made has a camera that moves independently of the player character, which I've basically done by replacing all instances of "player" in the keyboard movement scripts with "cCam", who's an invisible dot that the view focuses on. As the player presses arrow keys, the camera slides around a large environment, and tells the main player character where to move by clicking.

So far, so good, but the problem I've now run into is in terms of walkable area. If I make the level into an environment of corridors etc, the camera will only move in places where there's a walkable area placed. Is there any way that I can get the camera character to move in non "walkable" areas, in a similar way to when telling a character to move "eAnywhere" when giving a move to x,y command?

Hopefully I'm being clear enough, and thanks in advance!

Pumaman

The keyboard movement scripts use the WalkStraight command -- however, if you don't care about walkable areas then just replace that with a standard Walk command using "eAnywhere".

The only special feature of WalkStraight over Walk is that it stops when it encounters a non-walkable area -- which is a feature you don't need!

Trent R

Except that I think he still might want the walkable areas for the 'player'. I don't see why he can't scratch the Keyboard Movement Module and just put cCam.x or y and increment them using ++ or --. If it's too slow, change it to += and -=


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

GarageGothic

You could also just increment the x and y values of SetViewport(x,y) when pressing the arrow keys (of course checking not go beyond the width and height of the room minus the viewport width/height, nor to allow negative values).

SMF spam blocked by CleanTalk