Jump to content


Photo
- - - - -

Level up system


  • Please log in to reply
9 replies to this topic

#1 GPro

GPro

    Gun Powder Games

  • GMC Member
  • 293 posts
  • Version:GM8

Posted 09 April 2011 - 06:47 AM

About Credit
Credit is optional but it must be given to "Gun Powder Games"

Edited by GPro, 24 April 2011 - 07:57 PM.

  • 0

#2 Joey McClenahan

Joey McClenahan

    GMC Member

  • New Member
  • 12 posts

Posted 16 April 2011 - 09:36 PM

excellent :D simple, and effective. i wish id had something like this when i started.

Edited by Joey McClenahan, 16 April 2011 - 11:25 PM.

  • 0

#3 GPro

GPro

    Gun Powder Games

  • GMC Member
  • 293 posts
  • Version:GM8

Posted 19 April 2011 - 06:17 AM

excellent :D simple, and effective. i wish id had something like this when i started.


Hey! Thank you Joey! :) :DPosted Image
  • 0

#4 laserjet

laserjet

    GMC Member

  • New Member
  • 99 posts

Posted 20 April 2011 - 02:59 PM

that's quite nifty, it's pretty easy to use as well.
  • 0

#5 GPro

GPro

    Gun Powder Games

  • GMC Member
  • 293 posts
  • Version:GM8

Posted 22 April 2011 - 01:42 PM

that's quite nifty, it's pretty easy to use as well.


Thanks dude :)
  • 0

#6 GPro

GPro

    Gun Powder Games

  • GMC Member
  • 293 posts
  • Version:GM8

Posted 18 February 2012 - 02:50 PM

bump
  • 0

#7 ddan49

ddan49

    GMC Member

  • New Member
  • 101 posts
  • Version:GM8

Posted 19 February 2012 - 02:07 AM

FYI, bumping your own tutorial without any actual info is against the rules.

But apart from that, it is very simple and efficient. The only thing I can say is that using global variable might be better. For a novice user, you could put in something like
global.variable = 0;
But for more in-depth I would always prefer to use the room's creation code to create globalvars (although you would need to point out that there were variables in the creation code to help out new users). So in creation code, I would put:
globalvar xp, xp_needed, health, level;
xp = 0;
level = 1;
xp_needed = 100 * level;
health = 100;
Then, you never have to worry about them again! Apart from that, the level up system is simple, efficient, and working.

Edited by ddan49, 19 February 2012 - 02:08 AM.

  • 0

#8 Tomp94

Tomp94

    GMC Member

  • GMC Member
  • 2 posts

Posted 04 December 2012 - 11:40 PM

Hi this worked great for my RPG and I've credited you in the game info :)

I do have an issue, however. My game is click-to-move (like Diablo for example) and works from rotating the sprite to face the mouse. When I use your system my sprites don't rotate anymore. I think this is due to something I read earlier on creaing health bars; when a draw event is made, the sprites seem to function differently (they were disappearing completely with other methods haha). Other than that everything else is fine though.

here is the step event of my player (keep in mind I'm a noob at gml haha)

//constant
if speed>=0 then image_speed=0.4
if speed=0 image_speed=0 && image_index=0
if health<=1 then instance_destroy()
//left click
if mouse_check_button(mb_left) move_towards_point(obj_move.x,obj_move.y,5)
if mouse_check_button(mb_left) image_angle = point_direction(self.x, self.y, mouse_x, mouse_y)
if point_distance(self.x, self.y, mouse_x, mouse_y)=0 then speed=0
//unarmed
if collision_circle(self.x,self.y,72,par_enemy,true,false) then sprite_index=spr_human_knight_unarmed_attack
else sprite_index=spr_human_knight_unarmed
//level-up
if collision_circle(self.x,self.y,72,par_enemy,true,false)
{
Damage = round(random(12));
enemy = instance_nearest(x,y,par_enemy);
enemy.Health -= round(Damage);
Experience += round(Damage);
can_attack = false;
alarm[0] = 20;
}

Perc_Health = (Health/MaxHealth) * 100;

if Health < 1
{
x = xstart;
y = ystart;
Health = MaxHealth;
}

if Experience >= MaxExperience
{
Experience -= MaxExperience;
Level += 1;
MaxExperience = Level * 100;
}


Thanks in advance :)
  • 0

#9 minthiha

minthiha

    GMC Member

  • GMC Member
  • 19 posts
  • Version:GM8

Posted 07 December 2012 - 02:39 PM

This level up is very good technique. But, I want to know about other ability to increase such as the damage and armor of the player. Should I add these items as the local or global variables and how I manage them when save the game.
  • 0

#10 juegosisa12

juegosisa12

    GMC Member

  • GMC Member
  • 26 posts
  • Version:GM8

Posted 14 December 2012 - 05:14 PM

is perfect, economical, and easy to learn :yes:
:)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users