Camera Movement

For questions about using Classic.

Post » Mon Feb 15, 2010 12:41 pm

Is there a way to move the "camera" using keys for example? I have a map bigger than the layout and I want to move the camera free. The game is a "strategy" and I cannot use the "following object" feature :)

I found this plugin: viewtopic.php?f=2&t=4687&hilit=advanced+camera+plugin

but I want to know if there is another way.. :)
B
2
G
2
Posts: 20
Reputation: 690

Post » Mon Feb 15, 2010 12:50 pm

Well, I'm sure you could use the camera plugin if you wanted, but you can use the normal method too.

Just have the screen follow an invisible sprite that's controllable with the keys.
Then you can move the camera around your layout during the game.

You can also set it up to use both, by having the camera set on either the player character or the invisible sprite, like so:

If global(camstate)=1
Follow player character
Else
Follow Invisible sprite

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Mon Feb 15, 2010 1:09 pm

I see. I think I use the plugin because is really easy. I only wanted to know if there is some other methods :D
B
2
G
2
Posts: 20
Reputation: 690

Post » Mon Feb 15, 2010 7:33 pm

You don't even need an invisible sprite if you don't want to use one. Just add/subtract from a couple of global variables and scroll to those values.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Feb 16, 2010 1:43 am

[quote="deadeye":3efr5swc]You don't even need an invisible sprite if you don't want to use one. Just add/subtract from a couple of global variables and scroll to those values.[/quote:3efr5swc]
Good point!
I'll make a note of that.
Where did I pick that nasty habit up from? :lol:

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Tue Feb 16, 2010 9:12 am

[quote="deadeye":1o345i2o]You don't even need an invisible sprite if you don't want to use one. Just add/subtract from a couple of global variables and scroll to those values.[/quote:1o345i2o]

and how to scroll?
B
2
G
2
Posts: 20
Reputation: 690

Post » Tue Feb 16, 2010 9:33 am

"Scroll to X" and "Scroll to Y." They're System actions.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Feb 16, 2010 10:16 am

its strange because i tried them and did not work first time.. now are working :roll:
B
2
G
2
Posts: 20
Reputation: 690

Post » Tue Feb 16, 2010 7:29 pm

Construct will never scroll past the layout unless you have Unbounded Scrolling activated in the Layout Properties.

Maybe you had a window the same size of the layout when you first attempted to scroll?
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Tue Feb 16, 2010 7:42 pm

no. i am pretty sure my layout was big because, i use for the background a "map" and that was the first time when i sad myself: i need to scroll around :)

anyway right now i am using the camera plugin and i am very pleased.
B
2
G
2
Posts: 20
Reputation: 690

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests