AriesGames
Member
Hello everyone,
I am using GM 8.0 by the way.
I know most of my titles are click-bait, but this time that's the issue indeed.
So like less then 25% of times I get application stopped working. The game freezes.
All this happens at launch, it either launches or it freezes.
This issue appeared only after I created this code...
I know it's not a good thing to use with function so much and in this way...
But just look at what I am trying to do and tell me how I could improve that.
Maybe it has nothing to do with this code, maybe it's just because I have 1500x1500 sprites which need to get cropped and optimized. But I am just asking...maybe there's something clear why this is happening.
I am using GM 8.0 by the way.
I know most of my titles are click-bait, but this time that's the issue indeed.
So like less then 25% of times I get application stopped working. The game freezes.
All this happens at launch, it either launches or it freezes.
This issue appeared only after I created this code...
I know it's not a good thing to use with function so much and in this way...
But just look at what I am trying to do and tell me how I could improve that.
It uses all directions, N,E,S,W. (W,D,S,A) I am just showing you one of them here...
-sht_col = shooting collision, like a ray but made of actual pixels to determine collision
-e2 = enemy 2
-p1 = player 1
-choice is what I use to determine the behaviour of the enemy
choice 1-4 are the movement directions decided by a choose function (will become randomize() later)
choice 7 for example is not even put in that choose function, it's declared.
I am over trying here I know...
-sht_col = shooting collision, like a ray but made of actual pixels to determine collision
-e2 = enemy 2
-p1 = player 1
-choice is what I use to determine the behaviour of the enemy
choice 1-4 are the movement directions decided by a choose function (will become randomize() later)
choice 7 for example is not even put in that choose function, it's declared.
I am over trying here I know...
Code:
with obj_p1 if place_meeting(x,y,obj_e2_sht_colW)
{
with obj_e2
{
choice = 007;
if choice = 007
{
vspeed = 0;
hspeed = 0;
if shoot_cooldown <= 0
{
sprite_index = spr_e2_shootW;
instance_create(x,y,obj_e2_bullet_W);
shoot_cooldown = 60;
}else{
shoot_cooldown -= 1;
}
}
}
}
Maybe it has nothing to do with this code, maybe it's just because I have 1500x1500 sprites which need to get cropped and optimized. But I am just asking...maybe there's something clear why this is happening.