Skip to content

Commit

Permalink
Globals refined
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwatson484 committed May 8, 2021
1 parent a03991f commit da3faee
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 82 deletions.
17 changes: 0 additions & 17 deletions invasion-force/objects/obj_arena_spawn/Create_0.gml
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
/// @description Setup
// You can write your code in this editor

global.victory = false

global.bossWins = 0
global.spawnEnemies = false

global.bossPoints = 50
global.boss2Points = 100
global.boss3Points = 120
global.boss4Points = 150
global.boss5Points = 200
global.enemy6Points = 10
global.missilePoints = 15

global.bossHealth = 100
global.boss2Health = 200
global.boss3Health = 300
global.boss4Health = 400
global.boss5Health = 500

// boss spawn
alarm[4] = 1 * room_speed
12 changes: 6 additions & 6 deletions invasion-force/objects/obj_asteroid/obj_asteroid.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions invasion-force/objects/obj_enemy2/obj_enemy2.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions invasion-force/objects/obj_enemy3/obj_enemy3.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions invasion-force/objects/obj_enemy5/obj_enemy5.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions invasion-force/objects/obj_enemy_spawn/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,6 @@ global.scheduleBoss3= true
global.scheduleBoss4= true
global.scheduleBoss5= true
global.spawnBoss = true
global.bossWins = 0

global.enemyPoints = 10
global.enemy2Points = 10
global.enemy3Points = 25
global.enemy4Points = 15
global.enemy5Points = 30
global.enemy6Points = 10
global.bossPoints = 50
global.boss2Points = 100
global.boss3Points = 120
global.boss4Points = 150
global.boss5Points = 150
global.missilePoints = 15

global.enemy3Health = 10
global.enemy5Health = 25
global.bossHealth = 100
global.boss2Health = 200
global.boss3Health = 300
global.boss4Health = 400
global.boss5Health = 500


// enemy spawn
alarm[0] = 1 * room_speed
Expand Down
2 changes: 1 addition & 1 deletion invasion-force/objects/obj_gameover/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

draw_set_halign(fa_center)
draw_set_valign(fa_middle)
draw_text(view_hview[0]*0.5,view_wview[0]*0.5,"GAME OVER. Press space to restart.")
draw_text(view_hview[0]*0.5,view_wview[0]*0.5,"GAME OVER. Press enter to restart.")
2 changes: 1 addition & 1 deletion invasion-force/objects/obj_gameover/obj_gameover.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion invasion-force/objects/obj_victory/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

draw_set_halign(fa_center)
draw_set_valign(fa_middle)
draw_text(view_hview[0]*0.5,view_wview[0]*0.5,"Victory. Press space to restart or Q to quit.")
draw_text(view_hview[0]*0.5,view_wview[0]*0.5,"Victory. Press enter to restart or Q to quit.")
2 changes: 1 addition & 1 deletion invasion-force/objects/obj_victory/obj_victory.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions invasion-force/objects/obj_world/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
randomize()

audio_stop_sound(snd_title)
audio_stop_sound(snd_victory)

global.alive = true
global.restart = false
Expand All @@ -12,6 +13,30 @@ global.playerSpeed = 10
global.playerCanFire = true
global.invincible = false
global.playerLives = 5
global.victory = false

global.enemyPoints = 10
global.enemy2Points = 10
global.enemy3Points = 25
global.enemy4Points = 15
global.enemy5Points = 30
global.enemy6Points = 10
global.bossPoints = 50
global.boss2Points = 100
global.boss3Points = 120
global.boss4Points = 150
global.boss5Points = 150
global.missilePoints = 15

global.enemy3Health = 10
global.enemy5Health = 25
global.bossHealth = 100
global.boss2Health = 200
global.boss3Health = 300
global.boss4Health = 400
global.boss5Health = 500

global.bossWins = 0

if(room != Arena) {
// spawn extra life
Expand Down
2 changes: 1 addition & 1 deletion invasion-force/objects/obj_world/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if(!global.alive && !global.restart){
global.restart = true
}

if(global.restart && keyboard_check_pressed(vk_space)) {
if(global.restart && keyboard_check_pressed(vk_enter)) {
room_restart()
}

Expand Down
16 changes: 8 additions & 8 deletions invasion-force/objects/obj_world/obj_world.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit da3faee

Please sign in to comment.