Slide meter?

Non-platform specific questions.

Slide meter?

Postby SuperSonic » Wed Jun 08, 2011 10:32 pm

I want to make a slide meter in my game to control certain variables. Can anyone help me? :P
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Slide meter?

Postby skydereign » Wed Jun 08, 2011 10:45 pm

I'm in class right now, so I can't make a more dynamic example, but maybe this one will help.
http://game-editor.com/forum/viewtopic.php?f=2&t=6788&p=48575&hilit=slide+bar#p48554
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Slide meter?

Postby SuperSonic » Fri Jun 10, 2011 1:26 am

This is a lot like what I want. The only problem is that it's a little glitchy. Know what I mean? :)
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Slide meter?

Postby skydereign » Fri Jun 10, 2011 1:46 am

Yeah I know, was just something to point you in the right direction. Here is a more cleaned up example. It doesn't keep the variable between 0 and 1, but the display does, by dividing the variable by the width of the bar.
Code: Select all
textNumber=(float)slide_var/bar.width;


It uses the same data folder as the other file I pointed you to.

-Edit
Attached one that you can specify the max of the variable.
Attachments
slide_bar_update.ged
(2.07 KiB) Downloaded 58 times
slide_bar.ged
(2.03 KiB) Downloaded 57 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Slide meter?

Postby SuperSonic » Sat Jun 18, 2011 8:30 pm

Sorry, it took me a while to get back on and check this :D

Thanks for the code and examples. This should work :P
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest