hello! currently working on a tycoon like game. I have it set where you can pan around the scene using the middle mouse button down, and all that stuff. I was trying to figure out how to use the wheel to zoom in and out in game, but I have not clue, anyone know how?
thanks!
Use the "on Mouse Wheel" condition in the mouse object and then depending on your preference, use either set layout/layer scale or set layer Z Elevation.
Develop games in your browser. Powerful, performant & highly capable.
thanks! One more question to add on I guess, how would I go about adding to the scale or subtracting from the scale?
for example, on mouse wheel up, add lets say 0.2 to the scale, and then on mouse down, subtract that from the layout scale?
use "set layout scale" layoutscale+0.2 or -0.2.
You can also add a condition that sets your max or min zoom levels.
so
On Mousewheel Up
Layoutscale>0.4
- Set layout scale - layoutscale-0.2
On Mousewheel Down
Layoutscale<1.6
- Set layout scale - layoutscale+0.2