Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Metroids
#11
Just found a bug. (why do I always find bugs in my own codes just after I released them)

When the no highscore bug is reproduced an error will occour.

Solution:
Replace the code in game flow's alarm 0 with this:
    GML-Code:
if instance_exists(0){
var xx,yy,control;
control = true
 
while(control){
xx = random(room_width)
yy = random(room_height)
switch(floor(random(4))){
case 0:
if point_distance(xx,yy,(0).x,(0).y)>120{
instance_create(x,y,1)
control = false
}
break
case 1:
if point_distance(xx,yy,(0).x,(0).y)>120{
instance_create(x,y,1)
control = false
}
break
case 2:
if point_distance(xx,yy,(0).x,(0).y)>120{
instance_create(x,y,4)
control = false
}
break
case 3:
if point_distance(xx,yy,(0).x,(0).y)>120{
instance_create(x,y,5)
control = false
}
break
}
}
 
alarm[0] = 300
}

Then delete all meteors player collision event and place their alarm 0 actions in game flows alarm1(you need to create one).
And in game flows step event add this:
    GML-Code:
if instance_exists(0) = false{
if alarm[1] = -1{
alarm[1] = 30
}
}


Also in ships collision with the meteors delete the destroy game flow action.
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
Reply
Thanks given by:


Messages In This Thread
Metroids - by Bamboori - 10-03-2009, 02:12 PM
RE: Metroids - by Som1Lse - 10-03-2009, 02:53 PM
RE: Metroids - by Bamboori - 10-03-2009, 02:54 PM
RE: Metroids - by TheNave - 10-03-2009, 03:11 PM
RE: Metroids - by Som1Lse - 10-03-2009, 03:27 PM
RE: Metroids - by Bamboori - 10-03-2009, 03:29 PM
RE: Metroids - by Ramond - 10-03-2009, 03:36 PM
RE: Metroids - by Bamboori - 10-03-2009, 03:39 PM
RE: Metroids - by Som1Lse - 10-03-2009, 05:01 PM
RE: Metroids - by Bamboori - 10-03-2009, 05:24 PM
RE: Metroids - by Som1Lse - 10-03-2009, 05:42 PM
RE: Metroids - by Bamboori - 10-03-2009, 05:44 PM
RE: Metroids - by TheNave - 10-03-2009, 06:11 PM
RE: Metroids - by Bamboori - 10-04-2009, 11:47 AM
RE: Metroids - by Som1Lse - 10-04-2009, 01:39 PM
RE: Metroids - by Bamboori - 10-05-2009, 01:19 PM
RE: Metroids - by Som1Lse - 10-06-2009, 05:01 PM
RE: Metroids - by Bamboori - 10-06-2009, 05:04 PM
RE: Metroids - by Som1Lse - 10-06-2009, 05:09 PM
RE: Metroids - by Bamboori - 10-06-2009, 05:26 PM
RE: Metroids - by TheNave - 10-06-2009, 07:17 PM
RE: Metroids - by Ramond - 10-06-2009, 07:28 PM



Users browsing this thread: 1 Guest(s)