Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
I'm creating a system so that the shot is born in front of me, 20 pixels in front of the character regardless of right or left
var move = key_right - key_left
hspd = move * spd
vspd += grv
if(hspd!=0)
image_xscale = sign(hspd)
#region TIRO
var flipped =...
I'm not sure if this is a bug or if there is a way to get around this but it seems like if an object is controlled by a sequence, the image_xscale and image_yscale values of that object automatically get assigned to a value of 1 even if those values were otherwise set to something else....
For...
Hello everyone, I'm creating an effect that gives brightness to items, using code from youtuber Matharoo (this effect here):
the code itself works, but there's a problem with it that I can't resolve.
//draw event
if(!surface_exists(surf))
{
surf = surface_create(sprite_width,sprite_height)...
I want a character to move left and point to the left direction with a key, and do the same thing to the right with another key, I am using this code.
if keyboard_check(vk_right) {
x += 5;
image_xscale = 1;
}
else if keyboard_check(vk_left) {
x -= 5;
image_xscale = -1;
}
My...
It make's no sense to me, and here is the code: if (hsp != 0) image_xscale = sign(hsp)
And here's the way that hsp (hspeed) is being calculated
key_left = keyboard_check(vk_left);
key_right = keyboard_check(vk_right);
var _move = key_right - key_left;
hsp = _move * walksp;
edit:
Here is the...
Hello, everyone! I use this code to check if the cursor is on the sprite of certain interactable objects, but it obviously doesn't work if the sprite is mirrored with image_xscale (or image_yscale).
with (parent_interact) {
if (mouse_x >= x-sprite_xoffset) && (mouse_x <=...
hello guys, I have a problem that's been a bit difficult to solve. Recently I'm using mp_potential and mp_grid a lot, they are helping me a lot to create different and smarter enemies but there is a problem with all this: image_xscale. I can't flip the side of the sprite to the right position...
I have this line that should change the xscale of the object:
if (hsp != 0) image_xscale = sign(hsp);
When I use it, nothing happens. So after shifting the location of the code in Step, everything remained the same.
Eventually I just wanted to try out how image_xscale works so I put in this...
Okay, I feel like this should be very straight forward. What rudimentary nugget of knowledge am I missing here?
Inside of my Particle Object I have this bit of code...
part_type_scale (partType_hero, oHero.image_xscale, 1);
I have tried setting a variable inside the particle object like...
Okay, so I have a character model with a separate head and body sprite. The sprites are the same size but the head sprite is transparent where the body would be and the body is transparent where the head would be. The reason for this is that I want the head to be able to rotate independently of...
Hi, thank you for taking some time to look at my thread. I'm making a 2D platformer and am having a problem which, as narrowly as I can identify, is related to my vertical collisions. The problem, I think, is this: When I have my character use a vertical (player-controlled) elevator, the...
I'm working on slopes and they're very sensitive to collision mask changes. I'm getting stuck in the slope when my player object turns around (i.e. when its image_xscale value goes from 1 to -1). I determined that the collision mask is shifting by 1 pixel when the sprite flips but it's not...
So I have entities that draw themselves like so:
draw_sprite_ext(sprite_index, image_index, x + xVelSub, y + yVelSub, image_xscale, image_yscale, image_angle, c_white, image_alpha);
where xVelSub and yVelSub are the subpixel velocity values carried over between steps, to create smoother...
So I am making this platformer game and im using image xscale to flip my character. What ends up happening when I run my game is that if I move left or right it morphs my sprite into a skinny form of itself.
The code I used was this, where hsp is the horizontal speed.
Code:
if (hsp !=0)...
i have the player and the arm as separate objects so that the arm can move to shoot the gun, when im running to the right, it looks fine, but when i start running to the left, the arm stays in the same spot. how can i copy the image_xscale of the player to the arm?
Hi!
I'm making a 2d platformer and I have enemies that chase the player.
I came up with this code to change the x_scale:
//setting variable place
if Nasu_obj.x - monster_obj_1.x < 0
{
place = place + 1;
}
if Nasu_obj.x - monster_obj_1.x > 0
{
place = place - 1;
}
(Nasu_obj is the...
Hi everyone,
Im having trouble restricting my players gun angle. whether he is facing left or right he can aim the gun behind him even though he isn't facing that direction. I would like to restrict oGun to only aiming between 150 and 210 while he is facing left and 30 and 330 while facing...
Hi guys, I am working on an object in which if you:
+ Press W: Jump
+ Press A: Image_xscale = -1, move back
+ Press D: image_xscale = 1, move forward
+ Press S: Duckling
However, in draw event, I got:
draw_self():
draw_healthbar(x-20,y-20,y-16,x+20,health,c_black,c_red,c_lime,0,false,true);
but...
Hi guys, I'm trying to replicate the scaling on the iOS camera roll when you open a photo.
You can scale the image up, pan around the image and rotate it.
I have all of those working on a sprite when you use two fingers, except it always scales from the center of the sprite where I've set the...