Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///====STARS====///
- //Draw Stars
- draw_self();
- //Discovered Status
- if (self.discovered = true) {
- image_index = self.imageIndex;
- draw_set_colour(c_white);
- draw_set_halign(fa_center);
- draw_text_transformed(x+sprite_width/2,y+sprite_height+1,string(self.starName),0.8,0.8,0);
- } else {
- image_index = obj_core.starSpritesTotal;
- }
- //User Interaction
- if (mouse_x>x and mouse_x<x+sprite_width and mouse_y>y and mouse_y<y+sprite_height) {
- //Discovered Pop Up
- if (self.discovered = true) {
- //Display Star Properties
- } else {
- draw_set_colour(c_white);
- draw_set_halign(fa_center);
- draw_text_transformed(x+sprite_width/2,y+sprite_height+1,"Unknown: "+string(self.starName),0.8,0.8,0);
- }
- //Click Action
- if (mouse_check_button_released(mb_left)) {
- //Temp Dev Tool
- self.discovered = true;
- //Load Grid
- starGrid = ds_grid_create(obj_core.starVariables,obj_core.starsAmount);
- ini_open("Star_Grid.ini");
- ds_grid_read(starGrid,ini_read_string("Star Grid","Grid",""));
- ini_close();
- //Replace Values
- ds_grid_set(starGrid,obj_core.discovered,self.starIndex,1);
- //Unload
- ini_open("Star_Grid.ini");
- ini_write_string("Star Grid","Grid",ds_grid_write(starGrid));
- ini_close();
- ds_grid_destroy(starGrid);
- }
- }
Add Comment
Please, Sign In to add comment