Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / command for increasing of a varible

Author
Message
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 2nd Jul 2008 10:55
is there a command that basicly says
if you press a key variable will increase by 5

and then if the varible increases by 5 then do somthing?

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 2nd Jul 2008 12:19 Edited at: 2nd Jul 2008 12:20
If Spacekey() = 1 Then Inc MyValue,5

Is this what you mean? if so then try using it with the ScanCode as you get better Keyboard Access

IE: If ScanCode() = 15 Then Inc MyValue,5

You can get ScanCode Values using the following
Do : CLS : Text 10,10,Str$(ScanCode()) : Sync : Loop

Everyone Be Cool, You, Be Cool.
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 2nd Jul 2008 18:11
no i mean
say my score is 1
score=1
and to increase the score you press the space key - it will increase it by 1

and then ever ten points say i did something
eg it printed 1

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 2nd Jul 2008 19:23
dont work...
score=1
do
if spacekey()=1 then INC score, 1
IF score MOD 10 = 0 then print "1"
loop

every time i press space it just says high
i want it every time i get 10 score (ten preses) it says 1
then when you press 10 again it says 2

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 2nd Jul 2008 19:40 Edited at: 2nd Jul 2008 19:41
oh

Everyone Be Cool, You, Be Cool.
MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 2nd Jul 2008 19:43 Edited at: 2nd Jul 2008 19:47
Why not just use this print Str$(Score/10)
This should give you a whole number where 10=1 20=2, ect, either that or what WindowsKiller said above

Everyone Be Cool, You, Be Cool.
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 2nd Jul 2008 20:09
nonononononononononononononononononononoono
you dont understand
ive found a dll that makes a progress bar
and every few seconds its upgrades
but i want to change that so every amount of score you get it upgrades

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 2nd Jul 2008 20:54
A: because im not soley trying to find out for the dll
and because it shouldnt use the dll commands for what i want
B: i dont know how to code it to code it =S

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
nackidno
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Där solen aldrig skiner
Posted: 2nd Jul 2008 22:06
You basicly want a bar that get filled after time the score goes up? That's what you want?

- Elias, Damezean, Nackidno, Wonderboy

AntocGames - http://antocgames.se.nu/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 2nd Jul 2008 22:36
http://mysite.wanadoo-members.co.uk/darksidefreeware/index.html the dll is there
Quote: "You basicly want a bar that get filled after time the score goes up? That's what you want?
"


as the socre increase the bar fills

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 2nd Jul 2008 23:30
maybe that person will tell me what im saying cos im confusing myself

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
nackidno
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Där solen aldrig skiner
Posted: 3rd Jul 2008 00:46
There is a very stupid way to do that. And I'm sure there is a VERY much better way to do it. But making 10 pictures, each getting more filled, like the exaple below.

---------- picture 1
0---------
00--------
000-------
0000------
00000-----
000000----
0000000---
00000000--
000000000-
0000000000 all the way to picture 10

and when yo get to a certain point in a variable (say 10), you change the picture to picture 2. Which has 10% filled.

As I said, this is a very, very, VERY stupid way to make this. And I'm sure there is a better way to do this.

And your last point... Is there absolutely NO way to describe what you mean? An accurate explanation of your problem(s) might make people understand your meaning. 'cause I really don't, I'm just guessing.

- Elias, Damezean, Nackidno, Wonderboy

AntocGames - http://antocgames.se.nu/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 3rd Jul 2008 01:15
nakidno you know what i mean you keep telling me what i want to know
your the only one who does know

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
nackidno
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Där solen aldrig skiner
Posted: 3rd Jul 2008 01:28
So you think you can get this working now?

- Elias, Damezean, Nackidno, Wonderboy

AntocGames - http://antocgames.se.nu/
sinisterstuf
17
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 3rd Jul 2008 02:56
There is a program in the 20 lines challenge that does JUST this!!! I forgot what it's called... Maybe "Click! The simplest RPG ever" or something like that. I think the author has a bar image saved as a sprite and then stretches it to do something similar to what nakidno described above.

When the going get stuf,
the stuf get's sinister
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 3rd Jul 2008 03:47 Edited at: 3rd Jul 2008 12:10
Maybe I don't know what you are looking for, but try this:



Sorry if I am wrong.


Whatever...
nackidno
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Där solen aldrig skiner
Posted: 3rd Jul 2008 12:01
No, that's not what he mean. He means like a loading bar in a game. After time it gets filled up.

- Elias, Damezean, Nackidno, Wonderboy

AntocGames - http://antocgames.se.nu/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 3rd Jul 2008 22:52
well i did it =D
the progress bar will be in my next version of my game
itll show how far you need to work to get certain things

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
sinisterstuf
17
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 3rd Jul 2008 23:37
Oh, I get it

When the going get stuf,
the stuf get's sinister
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 4th Jul 2008 04:21
I am not sure that I do.


Whatever...
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 4th Jul 2008 23:08
... It seems like it got over complicated. Just a bar that stretches to show progress?


This is my WIP, not even ready for a WIP thread yet though.http://smallgroupproductions.com/
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 4th Jul 2008 23:54
Quote: "well i did it =D
the progress bar will be in my next version of my game
itll show how far you need to work to get certain things"

dont worry i got it working

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8

Login to post a reply

Server time is: 2024-11-25 02:08:12
Your offset time is: 2024-11-25 02:08:12