How do I zoom gracefully.

Get help using Construct 2

Post » Wed Sep 02, 2015 1:30 pm

There must be one little thing I'm doing wrong. Even when I copy and paste your events to my file it doesn't work the same. Have you set anything besides the events? Is there something special set in the game window, in the layers? What is Var1 set to?
B
7
S
2
Posts: 92
Reputation: 663

Post » Wed Sep 02, 2015 1:33 pm

It must the scroll to object! lol, like you said. I'm going to have to mess around with attaching a blank sprite to the selected unit. That way when the player zooms out it will zoom in on that player. Sorry I didn't understand what was going on here.

So, just wondering. When I set up mouse to drag the map, or mouse drag scroll, based on another tutorial, will this work differently? Can I set scroll to, to the mouse? or something?
B
7
S
2
Posts: 92
Reputation: 663

Post » Wed Sep 02, 2015 2:20 pm

Ugh, Now I'm having trouble with scroll to, and the mouse in general. Setting the cursor from sprite does not work, in any browser, or if I export the game for window.

Start of layout - set mouse style to none.
Every tick - set cursor from sprite.

does nothing. The only thing that worked is.

Everytick set cursor style - none
every tick set position of cursorSprite to MouseX, Mouse,Y.

The problem is when the cursor is used to scroll the screen it scrolls really, really fast.

If I try to delay the speed by doing this.

every tick - set angle of cursorSprite to Mouse.X, Mouse.Y and cursorSprite move forward 2px

I get the slow scrolling I want, but sometimes the sprite image flips out and spins, which is no good.

Construct is very buggy when it comes to the mouse. I already know it doesn't work in EI.. but you might as well add Chrome, and Firefox to the list, because they aren't working there either, or in desktop export...

Why?

Also wondering, is there a way to set the scroll speed, mouse speed, anything?

I could handle the first working method, set sprite to mouse position, but can't handle the speed the screen scrolls when using the mouse to scroll...

This is horrid experience for paying customer :(
B
7
S
2
Posts: 92
Reputation: 663

Post » Wed Sep 02, 2015 4:48 pm

You can't scale to 0, because at 0 it would get infinitely small. Below 0 it would probably turn around the screen axis, but let's just assume, that the values cut off at 0, so that won't happen either.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Wed Sep 02, 2015 5:34 pm

I see, thanks for the info. I'm not sure how low the numbers are going now, but they must be quite small. Able to get the sprites to be tiny in the top left corner. This is working now, but the newest issue is the mouse pointer. No matter what events I set up it doesn't seem to work.. The closest thing to what I wanted fro slow scrolling was

set mouse style to none.
every tick set sprite to point at Mouse.X,Mouse.Y and move the sprite forward 2px.
Also the spirte for the pointer is set to scroll to.

This lets me move the mouse around the map scrolling slow, but sometimes when the mouse is still the pointer spite I have flips out. It has something to do with the angle, and continually moving forward. Is there a way to capture if the mouse is moving? This might be a method of stopping it from flipping out.

Something like
If mouse is still set pointer sprite to Mouse.X, Mouse.Y...
B
7
S
2
Posts: 92
Reputation: 663

Post » Wed Sep 02, 2015 6:18 pm

Well, I figured that out. lastMouse positions minus current, if not zero moving... but that's still sketchy. There must be a good way to set scroll to a sprite that follows the mouse, and make it not scroll the screen like lightning.. All this will help my current project.

Not all is lost, I have backup methods for everything, but the fall back is to set a scrolling item to last clicked unit, and make the map dragable. I would like to have both a slow scrolling mouse, and a dragable map :( lol
B
7
S
2
Posts: 92
Reputation: 663

Previous

Return to How do I....?

Who is online

Users browsing this forum: AnD4D, Google [Bot] and 21 guests