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

#1 2012-05-31 14:51:32

royjrdude
New Scratcher
Registered: 2012-05-24
Posts: 5

xp system??

So im almost finished with my pre alpha test beta game and all i need to do now is build a leveling mech, this is the equation im using

Forever if XP=100 or XP<199 set char_LV =2
                    200 or     299                    3

ECT.....

Just when i code it i can succesfully goto to at 100xp but as soon as i gain one point its back to lv 1 unill i get 200 xp then it goes to 3 but at 201 it goes back to one again iv been trying to fix this for 3 days on my own im getting frustrated plz someon ehave some help i could use it.

Offline

 

#2 2012-05-31 15:34:13

Tbtemplex97
Scratcher
Registered: 2011-11-12
Posts: 100+

Re: xp system??

do forever if XP < 100 set rank to 1
else if XP < 200 set rank to 2
else if XP < 300 set rank to 3
else if XP < 400 set rank to 4

This is the best way and easiest


Online Status: http://blocks.scratchr.org/API.php?action=onlineStatus&amp;user=Tbtemplex97
Darkspace Coming Soon!, Try the Singleplayer Demo

Offline

 

#3 2012-06-02 15:55:39

WingsGames
Scratcher
Registered: 2011-02-21
Posts: 500+

Re: xp system??

So you want the level to go up every 100 points? This may work:

when gf clicked
forever
  if (round(exp/100))=(exp/100)
    set (level) to (exp/100)

Last edited by WingsGames (2012-06-02 15:56:24)


Are you an aspiring home decorator? If so, please answer my question!

Offline

 

#4 2012-06-02 17:00:31

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: xp system??

when gf clicked
forever
set [level v] to (round(((exp)+(50))/(100)))

Last edited by MoreGamesNow (2012-06-02 17:01:07)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#5 2012-06-02 17:08:20

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: xp system??

WingsGames wrote:

So you want the level to go up every 100 points? This may work:

when gf clicked
forever
 if <(round ((exp) / (100))) = ((exp) / (100))>
  set [level v] to ((exp) / (100))
 end
end

Fixed [your v] (scripts)


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#6 2012-06-02 19:31:53

WingsGames
Scratcher
Registered: 2011-02-21
Posts: 500+

Re: xp system??

SciTecCf wrote:

WingsGames wrote:

So you want the level to go up every 100 points? This may work:

when gf clicked
forever
 if <(round ((exp) / (100))) = ((exp) / (100))>
  set [level v] to ((exp) / (100))
 end
end

Fixed [your v] (scripts)

Oops. Thanks.


Are you an aspiring home decorator? If so, please answer my question!

Offline

 

Board footer