This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-08-18 23:04:18

skykoi
Scratcher
Registered: 2012-06-30
Posts: 22

Help with game leveling and experience bar?

I'm making a game where players can level up.

I want to make it so that when the exp bar is on a certain costume # it changes the level variable by 1.

I'm not sure if this is possible o.o

Though if anyone knows how I would love to know! Thanks people  smile

Offline

 

#2 2012-08-18 23:11:15

ZombieHappines
Scratcher
Registered: 2012-01-19
Posts: 100+

Re: Help with game leveling and experience bar?

skykoi wrote:

I'm making a game where players can level up.

I want to make it so that when the exp bar is on a certain costume # it changes the level variable by 1.

I'm not sure if this is possible o.o

Though if anyone knows how I would love to know! Thanks people  smile

i think this is what your looking for

When gf clicked
forever if <costume number of (xp bar) = Whatever>
  change level by 1


http://i47.tinypic.com/10wr3bq.jpg
http://i50.tinypic.com/2w7onpy.png

Offline

 

#3 2012-08-18 23:14:03

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Help with game leveling and experience bar?

ZombieHappines wrote:

skykoi wrote:

I'm making a game where players can level up.

I want to make it so that when the exp bar is on a certain costume # it changes the level variable by 1.

I'm not sure if this is possible o.o

Though if anyone knows how I would love to know! Thanks people  smile

i think this is what your looking for

When gf clicked
forever if <([costume # v]  of [xp bar v]) = (number)>
  change [level v] by (1)

fixed


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#4 2012-08-18 23:15:07

ZombieHappines
Scratcher
Registered: 2012-01-19
Posts: 100+

Re: Help with game leveling and experience bar?

zammer990 wrote:

ZombieHappines wrote:

skykoi wrote:

I'm making a game where players can level up.

I want to make it so that when the exp bar is on a certain costume # it changes the level variable by 1.

I'm not sure if this is possible o.o

Though if anyone knows how I would love to know! Thanks people  smile

i think this is what your looking for

When gf clicked
forever if <([costume # v]  of [xp bar v]) = (number)>
  change [level v] by (1)

fixed

thanks i am not very good at scratchblocks

Last edited by ZombieHappines (2012-08-18 23:15:26)


http://i47.tinypic.com/10wr3bq.jpg
http://i50.tinypic.com/2w7onpy.png

Offline

 

#5 2012-08-18 23:24:11

skykoi
Scratcher
Registered: 2012-06-30
Posts: 22

Re: Help with game leveling and experience bar?

Thank you both  big_smile !!!

Offline

 

#6 2012-08-18 23:35:57

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Help with game leveling and experience bar?

Erm, i see a flaw with this script though, the exp bar would have to change costume immediately afterwards otherwise it'd always add levels on


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#7 2012-08-19 01:20:50

OverPowered
Scratcher
Registered: 2012-07-27
Posts: 100+

Re: Help with game leveling and experience bar?

zammer990 wrote:

Erm, i see a flaw with this script though, the exp bar would have to change costume immediately afterwards otherwise it'd always add levels on

Thus, add this script to the experience bar sprite.

when gf clicked
switch to costume [FirstCostume v]
forever
switch to costume (Experience)
if <(costume #) > (LastCostumeMinusOne)>
change [Level v] by (1)
set [Experience v] to (0)
switch to costume [FirstCostume v]
end
Just replace "LastCostumeMinusOne" with the number of the last health bar costume, minus one. ( :P )
Hope this helps. ^^


Newest project: Tunnel TEST ~http://blocks.scratchr.org/API.php?user=OverPowered&amp;action=onlineStatus~ On my mind: Unicameralism

Offline

 

Board footer