How scroll bar??

Non-platform specific questions.

Postby Troodon » Fri Apr 20, 2007 7:10 pm

I can't understand. In the simple example ged file that works but in my game project, the scroll bar moves only in the wrong direction. The variable starts from 1000 instead of 0 and moves only to left instead of right.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Troodon » Fri Apr 20, 2007 7:25 pm

I mean that it should start from 1000 because it's a tool to set population limit. However I can't get it to run on the bar. It moves outside. :/
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Fri Apr 20, 2007 9:19 pm

oi! :(
that is not what it did when I used my code! :(
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby UltimatHedgehog » Sat Apr 21, 2007 12:28 am

Sgt. Sparky wrote:oi! :(
that is not what it did when I used my code! :(

Ah swear 'e's bri'ish.
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby Sgt. Sparky » Sat Apr 21, 2007 1:56 am

xD
I can impersonate most of their different types of accents :)
(I made morcior reaaaaaaaaal made at me for that, I made him think I was british for a while untill he started askin' questions xD)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Sat Apr 21, 2007 4:20 pm

Can I have a new code, please?
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Sat Apr 21, 2007 4:49 pm

did you copy and paste the previous code I gave you?
it worked fine when I used it with you're .ged hmmm,
what exactly do you want changed?...
I do not quite understand,
you're message at the top of this page does not tell what you want.
it just says somthin' went wrong.
could you please describe it better about what you want?
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Sat Apr 21, 2007 4:53 pm

I need one horizontal scroll bar which is in the beginning in the right with variable value of 1000.
Then when I move it to left it reduces from 1000 to zero.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Sat Apr 21, 2007 5:06 pm

okay,
try this:
Code: Select all
y = palkki.y - height / 2;
population = - (x - 100) * 5;
if(x < -100)x = -100;
if(x > 100)x = 100;

:D
when it is to the far right it will be 0,
far left: 1000! :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Sat Apr 21, 2007 5:24 pm

It wasn't what I really wanted.
I wanted it to be like this:
max left: variable = 0
max left: variable = 1000
BUT in the beginning, the scroller should be in the right. (and the variable 1000)
It's a population limit tool, so in the beginning it's 1000, BUT if you want you can edit it to be for example 8. Is this possible?

By the way, I think I will change the max variable to 50 instead of 1000.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Sat Apr 21, 2007 5:26 pm

okay then instead of *5 use /4 :)
and on create actor event of the button,
Code: Select all
x = 100;

:D
does that work?
and why are there 2 max left thingies?
EDIT: oooooooooh, you want it to start out at 1000 at the left, and when you change it it is 0? :)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Sat Apr 21, 2007 5:29 pm

The scroller doesn't go to to the bar.
And it can't move to right. It still moves to left only with negative numbers.
:cry:

It still starts with 0 instead of 100.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Sat Apr 21, 2007 5:30 pm

make a variable called change:
then use,
Code: Select all
if(change == 0 && x > -100)change = 1;
if(change == 1) {
y = palkki.y + height / 2;
population = (x + 100) / 4;
if(x < -100)x = -100;
if(x > 100)x = 100;
                        }

and on the create actor event
Code: Select all
x = -100;
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Troodon » Sat Apr 21, 2007 5:32 pm

No no no.
I need a scroll bar where I can set the population limit from range 0 to 50. (or 1000)

Position:
((O))-----------------------
Value: 0

Position:
--------------------------((O))
Value = 50 (or 1000)

In the create actor the scroller should be in position:
--------------------------((0))
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Sgt. Sparky » Sat Apr 21, 2007 5:32 pm

tekdino wrote:The scroller doesn't go to to the bar.
And it can't move to right. It still moves to left only with negative numbers.
:cry:

It still starts with 0 instead of 100.

use:
Code: Select all
if(change == 0 && x < 100)change = 1;
if(change == 1) {
y = palkki.y + height / 2;
population = (x + 100) / 4;
if(x < -100)x = -100;
if(x > 100)x = 100;
                        }

to overcome this use this code at the end of you're text actor's draw actor event:
Code: Select all
if(population < 0)population = 0;
if(population > 50)population = 50;

:D
Last edited by Sgt. Sparky on Sat Apr 21, 2007 5:35 pm, edited 1 time in total.
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron