Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///Variables
- //First, let's just get some controller vars
- vspd_def = 16; //Default Speed
- hspd_def = 16;
- vspd = vspd_def; //Speed
- hspd = hspd_def;
- moving = 0; //Are we moving the box?
- pausing = 0; //Are we in battle moving the box?
- vm = true; //Move wall_voff?
- tw = 582; //Target width
- th = 146; //Target height
- dw = 0; //Width left
- dh = 0; //Height left
- //Now, let's decide on a few properties of said walls
- wall_size = 6; //The px thick a wall is
- wall_width = 582; //The px long the wall is
- wall_height = 146; //The px tall the wall is
- wall_hoff = (640 - wall_width)/2;
- wall_voff = 237;
- //Then, create walls
- TLeft = instance_create(wall_hoff,wall_voff,obj_bat_bboxWall);
- TRight = instance_create(room_width - wall_hoff,wall_voff,obj_bat_bboxWall);
- BRight = instance_create(room_width - wall_hoff,(wall_voff + wall_height) - wall_size,obj_bat_bboxWall);
- BLeft = instance_create(wall_hoff,(wall_voff + wall_height),obj_bat_bboxWall);
- //Then, modify walls
- with TLeft
- {
- image_xscale = other.wall_width;
- image_yscale = other.wall_size;
- }
- with TRight
- {
- image_xscale = other.wall_size * -1;
- image_yscale = other.wall_height;
- }
- with BRight
- {
- image_xscale = other.wall_width * -1;
- image_yscale = other.wall_size;
- }
- with BLeft
- {
- image_xscale = other.wall_size;
- image_yscale = other.wall_height * -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment