Compilation of questions(camera, animation and screens)

For questions about using Classic.

Post » Mon Apr 14, 2014 8:32 pm

Hello, I have adopted construct classic for a game development project with a friend, but there are a few things I have encountered with it what I am not able to implement a entirely clear fix for.

I got into this project with some experience of coding already, having used c, c++ and other programming languages so far for the sake of speed I have avoided trying to write any native plugins, but I have gotten my self caught up on a few snags:

The first is somewhat of simple issue but an approach I am not entirely certain about the approach for :
I have been asked to implement a camera with zoom support:
I have managed to set the camera zoom via "system - Set Zoom"
Now this works, as long as I enable unbounded scrolling on the layout, the trouble occurs when I enable it
The camera cuts off the bottom of the layout and part of its left side.

Now i can manually make the camera track the player via an event sheet using system - scroll to x/y and using the players location.

But how is the best way to make this type of camera keep within the layout bounds this needs to work for if a scene needs a zoom out and zoom in effect also.

The second is animation related, from what I can see I cannot ask a sprite how quickly it is moving, for example how do I make a sprite do a skid animation when they have been running for a while(built up momentum)

The third is somewhat of a weird situation that has occurred, seemingly related to screen transitions and offscreen layout switches
The bug occurs in the non test setup when the screen has a fade transition and the following event sheet is setup for the layout:
Code: Select all
player is outside layout:
(inverted)if Y less than 0
(inverted)if Y greater than LayoutHeight
(inverted)if X greater than LayoutWidth
if X less than 0

with the action
Goto layout # with transition "fade" lasting 10ms

That is from the test where it works, on the one where it is bugged the fade time is different i currently do not have the project for the exact number but if needed i can obtain it.
Posts: 15
Reputation: 384

Post » Mon Apr 14, 2014 10:42 pm

For your scrolling problems - use MagiCam plugin and all your problems are gone. It have zoom feature and - quite nice and bit more naturally - lag feature.

For animation - you can control it via private variable of object. Set always -> animation speed -> private variable. Then you can control it. If player move -> every 10 ms -> Add 1 to private variable. Something like this.

As far I know - using transitions its not good at all. I always have problems with them. And for "go for layout when" is better to use something simpler, like "when player collision box" (use box, box object is always good) -> trigger once -> go for layout.

Sorry for poor english.
Posts: 37
Reputation: 576

Post » Wed Apr 16, 2014 7:50 pm

Thank you for your response so far, I have found the information very helpful, Still trying to get the camera to default its zoom at 200%, but you have put me on the right track with other elements.
Posts: 15
Reputation: 384

Post » Wed Apr 16, 2014 8:01 pm

This might help ??
You do not have the required permissions to view the files attached to this post.
What I know would fill a Book , what I don't know would fill a Library
Posts: 331
Reputation: 16,499

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest