Get Element Earth ▶
Support this channel ▶

Follow me on Facebook ▶
Follow me on Instagram ▶
Follow me on Twitter ▶
Follow me on Google+ ▶

▼ More ▼
General Game Maker Playlist ▶
Game Maker Networking ▶

In this video I’ll show you how to code horizontal slider bars from scratch. The fun thing about this code is that it’s abstract enough to work with any length and size slide bar sprites you supply it 😀

Part 1 ▶

▼ Useful Links and Resources ▼
Studio Project File ▶
GM 8 Project File ▶

Happy Coding 😀

Nguồn: https://shaarique.com/

Xem thêm bài viết khác: https://shaarique.com/game/

14 Comments

ThatRandomNova

June 30, 2020

I know I'm late, but for future viewers make sure your sprites are centered or they will not line up correctly.

Reply

Ronan312

June 30, 2020

how i can make the bar control view? i have tried but i can't change the position of bar in a room

Reply

HEY

June 30, 2020

________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object obj_soundSlider:

Variable obj_soundSlider.leftLimit(100032, -2147483648) not set before reading it.
at gml_Object_obj_soundSlider_StepNormalEvent_1 (line 8) – if ((mouse_x + xx) > leftLimit) && ((mouse_x + xx) < rightLimit)
############################################################################################
im having this problem. is there any way to solve it? 🙁

Reply

Sakexz

June 30, 2020

how do i hook this up to my sound?

Reply

KaarNij

June 30, 2020

@SlasherXGAMES ™ Good tutorial, I'm also wondering how to connect this to the effects volume and music volume in my game?

Reply

Dustin Scott

June 30, 2020

Thanks a lot for these two Tutorials. Helped me make a poop slider that moves it to the toilet to turn down the volume on the music tracks on my game. Adapted your code to meet my needs perfectly!

Reply

Vrabo

June 30, 2020

How would you apply this for sound volume? Great tutorials btw, one of the best on Youtube!

Reply

Filmting

June 30, 2020

Great tutorial, thanks mate, just what I needed. Wondering, cuz mah brain hurts atm. How exactly would you make it so that the bar starts at a certain position instead of 0. Say I have a global.mvol = 0.47 and i want the bar to start at 47% instead of 0%. Can't wrap my head around the reverse math to do just that atm.

Reply

Link_Farore_Hylian

June 30, 2020

Completely and utterly filled with in video ads.

Reply

Khor Win Win

June 30, 2020

how do you position the slider so that its in the middle of the bar fom the start?thx in advance

Reply

entangledvyne

June 30, 2020

thanks for the tutorials! I was wondering, is there any simple way to link % on the vertical bar/slider to the y height of background.
If I hypothetically had a 1280X1400 background/room with a 1280X720 view.

I was trying to figure out some sort of "if y=bottomLimit then room position = y.1400"  I'm a rubbish coder, and can't seem to wrap my head around it.

Reply

ReiziqZip

June 30, 2020

Please make video Tutorial Option

Reply

Larry tesla spacex boring Lawrence

June 30, 2020

thank you for a good tutorial

Reply

artitious

June 30, 2020

Really nice set of tutorials.
This will be very helpful for anyone needing this function.
Thanks for your efforts.

Reply

Leave a Reply