Jump to content


Photo

Saving the room stars and displaying it in level select room

gm:studio

  • Please log in to reply
6 replies to this topic

#1 EduSholaTweets

EduSholaTweets

    GMC Member

  • GMC Member
  • 26 posts
  • Version:GM:Studio

Posted 24 August 2015 - 01:25 PM

Hello guys thanks a lot for the support you have been giving me. A quick one, I need to be able to show the amount of stars gotten from a level in the level select room. The stars are gotten based on amount of Lives left after the the level is cleared. 
I have been able to display the amount of stars in the level complete room with this code in obj stars in level complete room.

 

if lives = 0

{

 sprite_index = spr_1star

}

 

if lives = 1
{
 sprite_index = spr_2stars
}
 
if lives = 2
{
 sprite_index = spr_3star
}

 

While in the level select room i want to be able to show the amount of stars received in that level below it I have a sprite below each level button the sprite is an image of 3 stars.is there a way to save the amount of stars into an ini file or something, btw I Have 5 levels, Please help guys!


  • 0

#2 seanMombo

seanMombo

    GMC Member

  • GMC Member
  • 592 posts
  • Version:GM:Studio

Posted 24 August 2015 - 02:52 PM

look up the ini functions in the manual, then go look up one of the hundred videos on youtube about ini saving 


  • 0

#3 EduSholaTweets

EduSholaTweets

    GMC Member

  • GMC Member
  • 26 posts
  • Version:GM:Studio

Posted 24 August 2015 - 07:43 PM

I need coding assistance, I'm not good at it, I'm a designer.


look up the ini functions in the manual, then go look up one of the hundred videos on youtube about ini saving 

I need coding assistance, I'm not good at it, I'm a designer

  • 0

#4 seanMombo

seanMombo

    GMC Member

  • GMC Member
  • 592 posts
  • Version:GM:Studio

Posted 24 August 2015 - 08:04 PM

from the manual;

 

Example:

score = 1000;
ini_open( 'savedata.ini' );
ini_write_real( 'save1', 'Score', score );
score2 = ini_read_real( 'save1', 'Score', 0 );
ini_close();

This will set score to 1000, then open 'savedata.ini' and write this value to 'save1' > 'Score'. Then, it will set score2 to the real value under 'save1' > 'score' in it, 1000, and close the .ini again. Had it not found this value, score2 would have ended up set as 0.


  • 0

#5 EduSholaTweets

EduSholaTweets

    GMC Member

  • GMC Member
  • 26 posts
  • Version:GM:Studio

Posted Yesterday, 07:35 AM

 ok thanks


Edited by EduSholaTweets, Today, 08:31 AM.

  • 0

#6 jackhigh24

jackhigh24

    GMC Member

  • GMC Member
  • 910 posts
  • Version:GM:Studio

Posted Yesterday, 04:43 PM

you need to read the manual, i see that you are already selling game you made on all the app store, god knows how you made them if you dont know how to do this, only way i see it is you have got us lot to make your games for you, sean gave you more than enough pointers there and you reply you dont want to read the manual, then we are not going to write you another game im sorry. 


Edited by jackhigh24, Yesterday, 04:47 PM.

  • 0

GMS version master collection  :P


#7 EduSholaTweets

EduSholaTweets

    GMC Member

  • GMC Member
  • 26 posts
  • Version:GM:Studio

Posted Today, 08:41 AM

you need to read the manual, i see that you are already selling game you made on all the app store, god knows how you made them if you dont know how to do this, only way i see it is you have got us lot to make your games for you, sean gave you more than enough pointers there and you reply you dont want to read the manual, then we are not going to write you another game im sorry. 

my game is free on all stores except apple app store bro, because I paid and got a macbook to put it there. as for how I made the game, gms has alot of drag and drop features and with my CGI skills (5 years experience) i was able to get it done. also got alot of assistance from people like you. I have done alot of designs and animations for people on their projects but i have never asked them to go learn how to design or animate. This is a community when you need help or guidance you ask without fear of being put down. </rant> 


Edited by EduSholaTweets, Today, 08:44 AM.

  • 0





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users