T
Teslatronik
Guest
Hello All, I'm making what i thought would be a rather simple drag and drop style Dinosaur "sticker book" for my son.. but the problem comes when i try to Flip the sprite while having a scale limitation.
i want to be able to press a key and have the sprite "flip" and stay flipped until the key is pressed again.
Any help is appreciated.. here is the code i have so far..(it instantly un-flips due to the limits i set)
///// Step Event -of the Dino object
Thanks, Alan.
i want to be able to press a key and have the sprite "flip" and stay flipped until the key is pressed again.
Any help is appreciated.. here is the code i have so far..(it instantly un-flips due to the limits i set)
///// Step Event -of the Dino object
Code:
///imagescale
//scale
if(position_meeting(mouse_x,mouse_y,self)) and mouse_wheel_down()
{
image_xscale -= 0.1;
image_yscale -= 0.1;
}
if(position_meeting(mouse_x,mouse_y,self)) and mouse_wheel_up()
{
image_xscale += 0.1;
image_yscale += 0.1;
}
//limits
if image_xscale < 0.2 then image_xscale = 0.2
if image_xscale > 2 then image_xscale = 2
if image_yscale < 0.2 then image_yscale = 0.2
if image_yscale > 2 then image_yscale = 2
//flip
if(position_meeting(mouse_x,mouse_y,self))and keyboard_check_pressed(ord("F"))
{
image_xscale = -image_xscale
}
//change image_index
if(position_meeting(mouse_x,mouse_y,self))and keyboard_check_pressed(vk_right)
image_index[0] += 1
if(position_meeting(mouse_x,mouse_y,self))and keyboard_check_pressed(vk_left)
image_index[0] -= 1