Main Script

Room Scripts

Object Scripts

Sprites

Sounds

CONSOLE

Clone of Totally Original Mick & Rorty Game
1 Plays Last modified: January 4, 2018
Spinoff
Share
0

{"game":{"type":"game script","start":"#\n\ntimer = 0\nroom_block_list_chunk = []\nroom_block_list = []\n#room_block_list currently has all the blocks in the game\n\n\ndef merge_lists(list_one, list_two):\n #because this is not part of pixelpad\n for i in list_two:\n list_one.append(i)\n return list_one\n\ndef jj_sort(arr):\n for i in range(len(arr)):\n for j in range(i, len(arr)):\n if(arr[i].x > arr[j].x):\n temp = arr[j]\n arr[j] = arr[i]\n arr[i] = temp\n return arr\n \n\n\nroom_set(\"rm_title\")\n\n\n\n\n\n\n","loop":"# Enter the loop code for your game here.\n\ntimer +=1\n"},"rm_level_01":{"type":"room script","start":"#\n\nglob = object_new(\"obj_global_vars\")\nglob.sprite = sprite_new(\"spr_raycast\")\n#object stores variables for the game\n\npc = object_new(\"obj_pc\")\npc.sprite_width = 0.5\npc.sprite_height = 0.5\npc.glob = self.glob\n\ngame.room_block_list = []\nsh = 0.5\nsw = 0.5\nblock_size = 64 * sw\n\ndef chunk_blocks(chunk_size):\n game.room_block_list = game.jj_sort(game.room_block_list)\n i = 0\n block_list = []\n for block in game.room_block_list:\n i+=1\n block_list.append(block)\n if i >= chunk_size:\n game.room_block_list_chunk.append(block_list)\n i = 0\n block_list = []\n if len(block_list) > 0:\n game.room_block_list_chunk.append(block_list)\n \n \ndef cbh(num_blocks, xx, yy):\n for i in range(0, num_blocks):\n b = object_new(\"obj_nrm_block\")\n b.x = i * block_size + xx\n b.y = yy\n b.z = 100\n b.sprite = sprite_new(\"spr_grassy_tile\")\n b.sprite_height = sh\n b.sprite_width = sw\n game.room_block_list.append(b)\n\ncbh(50, 0, -300 + (32 * 5))\ncbh(50, -6400, -300 + (32 * 4))\ncbh(3, 0, -300 + (32 * 3))\ncbh(4, 0, -300 + (32 * 2))\ncbh(501, -64, -300)\n\nchunk_blocks(25)\n\n\n\n","loop":"# Enter the loop code for rm_level_01 here.\n\ncamera_set(pc.x, pc.y + 100)\nglob.bg[0].x = pc.x \/ 1.1 + 500\n\n"},"obj_pc":{"type":"object script","start":"# Enter the start code for obj_pc here.\ndef init_keys(obj):\n obj.left_key = \"left\"\n obj.right_key = \"right\"\n obj.jump_key = \"z\"\n obj.shoot_key = \"x\"\n obj.dash_key = \"down\"\n obj.portal_key = \"c\" #will change to shoot key later\n \ndef sign(x):\n if x >= 0:\n return 1\n else:\n return -1\n\ndef count_down_player_timers(obj):\n if obj.hurt_timer > 0:\n obj.hurt_timer -= 1\n else:\n obj.hurting = False\n \n if obj.dash_timer > 0:\n obj.dash_timer -= 1\n else:\n if obj.on_ground:\n obj.dashing = False\n obj.dashspeed = 0\n \n if obj.shoot_timer > 0:\n obj.shoot_timer -= 1\n else:\n obj.shooting = False\n \n \ndef anim_set(obj, animation):\n animation_set(obj, animation)\n obj.current_animation = animation\n\ndef friction(obj, frict):\n if abs(obj.xspeed) > 0:\n obj.xspeed -= frict * sign(obj.xspeed) \n\ndef set_facing(obj):\n obj.sprite_xscale = obj.facing\n\ndef move(obj):\n #cap the speed\n if on_ground:\n if key_is_pressed(obj.left_key):\n obj.xspeed -= obj.xwalk_accel\n obj.facing = -1\n if key_is_pressed(obj.right_key):\n obj.xspeed += obj.xwalk_accel\n obj.facing = 1\n else:\n if key_is_pressed(obj.left_key):\n obj.xspeed -= obj.xwalk_accel \/ 2\n if key_is_pressed(obj.right_key):\n obj.xspeed += obj.xwalk_accel \/ 2\n \n if abs(obj.xspeed) > obj.xspeed_max and not obj.dashing:\n obj.xspeed = obj.xspeed_max * sign(obj.xspeed)\n \n if abs(obj.xspeed) <= obj.xspeed_min:\n obj.xspeed = 0\n \n obj.x += obj.xspeed\n obj.y += obj.yspeed\n \ndef gravity(obj, gravity_power):\n max_drop_rate = -250\n if not obj.on_ground:\n obj.yspeed -= gravity_power\n if obj.yspeed < max_drop_rate:\n obj.yspeed = max_drop_rate\n\ndef collision_check_raycast(obj, block_list_chunk, fil):\n #obj and fil is reversed\n pc_width = object_width(obj) \/2\n bl_width = object_width(block_list_chunk[0][0])\n for block_list in block_list_chunk:\n if (obj.x > block_list[0].x – bl_width) and obj.x < (block_list[len(block_list) – 1].x + bl_width): \n #if player within these chunk of blocks\n for block in block_list:\n #if block.x + bl_width > obj.x – pc_width and block.x – bl_width < obj.x + pc_width:\n if collision_check(block, fil):\n return block#return the block that’s colliding with ray\n\ndef find_ground(obj):\n raycast = object_new(\"obj_raycast\")\n raycast.sprite = sprite_new(\"spr_raycast_red\")\n raycast.z = 10000\n obj_w_pc = object_width(obj) \/2\n obj_h_pc = object_height(obj) \/2 \n raycast.sprite_width = obj_w_pc \/ 4\n \n for i in range(abs(obj.yspeed), abs(obj.yspeed) + 2):\n g = collision_check_raycast(obj, game.room_block_list_chunk, raycast)\n if g:\n obj_h_g = object_height(g) \/2#object_height() is slow\n obj_h_pc = object_height(obj) \/2\n #if colliding with the ground\n temp = obj_h_g + obj_h_pc\n if obj.y <= g.y + obj_h_g + obj_h_pc:\n #if my feet is touching or is on top of the ground\n #if obj.y > g.y + obj_h_g:\n #if the middle of my body is above the ground\n obj.on_ground = True\n if obj.yspeed < 0:\n obj.yspeed = 0\n obj.y = g.y + obj_h_g + obj_h_pc \n return obj.on_ground\n else:\n raycast.sprite_height = i\n #temp_var = \n raycast.y = obj.y – i\/2 – obj_h_pc \n raycast.x = obj.x\n obj.on_ground = False\n \ndef top_collision(obj):\n if obj.yspeed > 0:\n adjust_y = 10\n raycast = object_new(\"obj_raycast\")\n raycast.sprite = sprite_new(\"spr_raycast\")\n raycast.z = 10000\n obj_w_pc = object_width(obj) \/2\n obj_h_pc = object_height(obj) \/2 – adjust_y\n raycast.sprite_width = obj_w_pc \/ 4\n \n for i in range(0, abs(obj.yspeed) + 1):\n g = collision_check_raycast(obj, game.room_block_list_chunk, raycast)\n if g:\n obj_h_g = object_height(g) \/2#object_height() is slow\n obj_w_g = object_width(g) \/2\n obj.y = g.y – (obj_h_g + obj_h_pc + abs(obj.yspeed) + 1)\n return g\n else:\n raycast.sprite_height = i\n raycast.y = obj.y + (obj_h_pc + i\/2 + 1)\n raycast.x = obj.x\n\ndef hor_collision(obj):\n adjust_y = 10#adjusted because hair shouldn’t count\n #ensure adjust_y is the same in \"top_collision\" as well\n adjust_x = 5\n raycast = object_new(\"obj_raycast\")\n raycast.sprite = sprite_new(\"spr_raycast\")\n raycast.z = 10000\n obj_w_pc = object_width(obj) \/2 – adjust_x\n obj_h_pc = (object_height(obj) \/2) – adjust_y\n raycast.sprite_height = obj_h_pc * 2\n\n for i in range(0, abs(obj.xspeed) + 1):\n g = collision_check_raycast(obj, game.room_block_list_chunk, raycast)\n if g:\n obj_h_g = object_height(g) \/2#object_height() is slow\n obj_w_g = object_width(g) \/2\n if obj.x < g.x:\n obj.x = g.x – (obj_w_g + abs(obj.xspeed) + obj_w_pc \/2)\n else:\n obj.x = g.x + (obj_w_g + abs(obj.xspeed) + obj_w_pc \/2)\n return g\n else:\n raycast.sprite_width = obj_w_pc + i \n raycast.y = obj.y\n raycast.x = obj.x #+ (obj_w_pc \/2 + i \/2) * obj.facing\n \ndef shoot(obj, xx, yy, bullet, spd):\n b = object_new(bullet)\n b.x = xx\n b.y = yy\n b.z = obj.z + 5\n b.sprite_xscale = obj.facing\n b.xspeed = spd\n \n green_bullet = sprite_new(\"spr_mm_hadouken_green\", 1, 3)\n bullet_animation = animation_new(green_bullet, 30, 0, 2)\n animation_set(b, bullet_animation)\n \n se = object_new(\"obj_special_effect\")\n se.x = xx\n se.y = yy\n se.z = obj.z + 10\n se.sprite_xscale = obj.facing\n se.sprite_width = 0.15\n se.sprite_height = 0.15\n se.destroy_timer = 20\n \n green_plasma_sheet = sprite_new(\"spr_plasma_explode\", 1, 9)\n green_plasma = animation_new(green_plasma_sheet, 25, 0, 8)\n animation_set(se, green_plasma)\n \n obj.shooting = True\n obj.shoot_timer = 10\n\ndef jump(obj, jump_power):\n if can_jump(obj):\n obj.on_ground = False\n obj.yspeed = jump_power\n \ndef dash(obj, dashpower):\n obj.dashing = True\n obj.dash_timer = 20\n obj.dashspeed = dashpower\n\ndef dash_check(obj):\n if obj.dashing > 0:\n obj.xspeed = obj.xspeed_max + obj.dashspeed\n obj.xspeed *=obj.facing\n dash_image(obj)\n\ndef dash_image(obj):\n if game.timer % 2 == 0 and abs(obj.xspeed) > obj.xspeed_max + 1:\n image = object_new(\"obj_pc_afterimage\")\n image.x = obj.x\n image.y = obj.y\n image.z = obj.z-10\n image.sprite_xscale = obj.sprite_xscale\n image.sprite_height = obj.sprite_height\n image.sprite_width = obj.sprite_width\n animation_set(image, obj.current_animation)\n\n#can he do it?\n \ndef can_jump(obj):\n if obj.on_ground:\n return True\n \ndef can_dash(obj):\n if obj.on_ground and not obj.dashing:\n return True\n\n\ninit_keys(self)\n#init animations\nstand_sprite = sprite_new(‘spr_mmx_stand’, 1, 4)\nanim_stand = animation_new(stand_sprite, 1, 0, 3)\n\njump_sprite = sprite_new(‘spr_mmx_jump’, 1, 2)\nanim_jump_up = animation_new(jump_sprite, 0, 0, 0)\nanim_jump_down = animation_new(jump_sprite, 0, 1, 1)\n\nhurt_sprite = sprite_new(‘spr_mmx_hurt’, 1, 4)\nanim_hurt = animation_new(hurt_sprite, 15, 0, 3)\n\nwalk_sheet = sprite_new(‘spr_mmx_run’, 1, 4)\nanim_walk = animation_new(walk_sheet, 11, 0, 3)\n\nshoot_sheet = sprite_new(‘spr_mmx_shoot’, 1, 4)\nanim_shoot = animation_new(shoot_sheet, 11, 0, 3)\n\nslide_sheet = sprite_new(‘spr_mmx_dash’, 1, 1)\nanim_slide = animation_new(slide_sheet, 0, 0, 0)\n\njump_shoot_sheet = sprite_new(‘spr_mmx_shoot’, 1, 4)\nanim_jump_shoot_up = animation_new(jump_shoot_sheet, 0,0,0)\nanim_jump_shoot_down = animation_new(jump_shoot_sheet, 0,1,1)\n\nxwalk_accel = 0.5\nxspeed_min = 0.05\nxspeed_max = 5\ndashspeed = 0#do not change\ndashpower = 5#change this to go faster\nxspeed = 0\nyspeed = 0\njump_power = 10\nfacing = 1\nz = 200\n\non_ground = False\nsliding = False\nhurting = False\nshooting = False\nslide_timer = -1\nhurt_timer = -1\nshoot_timer = -1\nanim_set(self, anim_stand) \n\n\nstats = object_new(‘obj_generictext’)\nstats.text.size = 12\nstats.y = 150\nstats.sprite_color = ‘#fff’\n \n","loop":"# Enter the loop code for obj_pc here.\nstats.x = self.x \nstats.y = self.y + 150\nstats.text.text = \"on_ground: \" + on_ground + \"\\n\"\nstats.text.text += \"dashing: \" + dashing + \"\\n\"\nstats.text.text += \"dash_timer: \" + dash_timer + \"\\n\"\nstats.text.text += \"hurting: \" + hurting + \"\\n\"\nstats.text.text += \"hurt_timer: \" + hurt_timer + \"\\n\"\nstats.text.text += \"shooting: \" + shooting + \"\\n\"\nstats.text.text += \"shoot_timer: \" + shoot_timer + \"\\n\"\nstats.text.text += \"current_anim: \" + current_animation + \"\\n\"\nstats.text.text += \"xspeed: \" + xspeed + \"\\n\"\nstats.text.text += \"yspeed: \" + yspeed + \"\\n\"\nstats.text.text += \"x: \" + x + \"\\n\"\nstats.text.text += \"y: \" + y + \"\\n\"\n\n\nif shooting:\n anim_set(self, anim_shoot)\nelse:\n if on_ground:\n if dashing:\n anim_set(self, anim_slide)\n else:\n if abs(xspeed) > 0:\n anim_set(self, anim_walk)\n else:\n anim_set(self, anim_stand)\n else:\n if yspeed > 0:\n anim_set(self, anim_jump_up)\n else:\n anim_set(self, anim_jump_down)\n\nif hurt:\n anim_set(self, anim_hurt)\n\nmove(self)\nif self.on_ground:\n friction(self, 0.25)\ngravity(self, 0.5)\n\nfind_ground(self)\ntop_collision(self)\nhor_collision(self)\n\nset_facing(self)\ncount_down_player_timers(self)\ndash_check(self)\nif key_was_pressed(dash_key):\n if can_dash(self):\n dash(self, dashpower)\n\nif key_was_pressed(jump_key):\n jump(self, jump_power)\n \nif key_was_pressed(shoot_key):\n shoot(self, x + 75 * sprite_width * facing, y – 40 * sprite_height, \"obj_basic_shot\", 15)\n\nif key_was_pressed(portal_key):\n shoot(self, x + 75 * sprite_width * facing, y – 40 * sprite_height, \"obj_portal_shot\", 5)\n\nif key_was_pressed(‘p’):\n wr = object_new(\"obj_dimension_warper\")\n wl = object_new(\"obj_dimension_warper\")\n wr.xspeed = 16\n wl.xspeed = -16\n wr.x = self.x\n wl.x = self.x\n \n wr.glob = self.glob\n wl.glob = self.glob\n \n bg_black = object_new(\"obj_black_bg\")\n bg_black.sprite = sprite_new(\"spr_black_dot\")\n bg_black.sprite_height = 1000\n bg_black.x = self.x\n bg_black.y = self.y\n bg_black.z = -100\n bg_black.warper_left = wl\n bg_black.warper_right = wr\n bg_black.glob = self.glob\n \n if glob.current_dimension ==\"c137\":\n glob.current_dimension = \"purple\"\n elif glob.current_dimension == \"purple\":\n glob.current_dimension = \"toxic\"\n elif glob.current_dimension == \"toxic\":\n glob.current_dimension = \"c137\"\n\n"},"obj_nrm_block":{"type":"object script","start":"# Enter the start code for obj_nrm_block here.\n\n","loop":"# Enter the loop code for obj_nrm_block here.\n\n"},"spr_tiles":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_tiles.png"},"obj_bg_layer":{"type":"object script","start":"# Enter the start code for obj_bg_layer here.","loop":"# Enter the loop code for obj_bg_layer here."},"obj_gnd_enemy":{"type":"object script","start":"# Enter the start code for obj_gnd_enemy here.\n\n","loop":"# Enter the loop code for obj_gnd_enemy here.\n"},"obj_basic_shot":{"type":"object script","start":"# Enter the start code for obj_basic_shot here.\n","loop":"# Enter the loop code for obj_basic_shot here.\n\nx += xspeed * sprite_xscale"},"obj_health":{"type":"object script","start":"# Enter the start code for obj_health here.\n\ntext = text_new(‘sans-serif’, 16)\ntext.text = ‘Health: 10’\nz = 1000","loop":"# Enter the loop code for obj_health here.\n\nx = camera_x() – (screen_width() \/ 4 + 50)\ny = camera_y() + (screen_height() \/ 4 + 80)"},"rm_lose":{"type":"room script","start":"# Enter the start code for rm_lose here.\n\nobject_new(\"obj_generictext\").sprite = sprite_new(\"spr_title_screen\")\n\nyoulose = object_new(‘obj_generictext’)\nyoulose.text.text = ‘You Died’\nyoulose.text.size = 48\nyoulose.y = 180\nyoulose.sprite_color = ‘#64d464’\n\ntryagain = object_new(‘obj_generictext’)\ntryagain.text.text = ‘Press [Z] to try again’\ntryagain.text.size = 24\ntryagain.y = -180\ntryagain.sprite_color = ‘#d46464’","loop":"# Enter the loop code for rm_lose here.\n\nif key_is_pressed(‘z’):\n game.playing = True\n game.playtime = 0\n room_set(‘rm_level_01’)"},"obj_generictext":{"type":"object script","start":"# Enter the start code for obj_generictext here.\n\ntext = text_new(‘Comic Sans MS’, 16)","loop":"# Enter the loop code for obj_generictext here."},"rm_win":{"type":"room script","start":"# Enter the start code for rm_win here.\n\nimport math\n\nyouwin = object_new(‘obj_generictext’)\nyouwin.text.text = ‘You Win!’\nyouwin.text.size = 48\nyouwin.y = 180\nyouwin.sprite_color = ‘#64d464’\n\nplaytime = object_new(‘obj_generictext’)\nplaytime.text.text = ‘You reached the end in\\n’ + math.floor(game.playtime * 100) \/ 100 + ‘\\nseconds!’\nplaytime.text.size = 32\n\ntryagain = object_new(‘obj_generictext’)\ntryagain.text.text = ‘Press [Z] to play again’\ntryagain.text.size = 24\ntryagain.y = -180\ntryagain.sprite_color = ‘#d46464’","loop":"# Enter the loop code for rm_win here.\n\nif key_is_pressed(‘z’):\n game.playing = True\n game.playtime = 0\n room_set(‘rm_level_01’)"},"obj_win_zone":{"type":"object script","start":"# Enter the start code for obj_win_zone here.\n\n","loop":"# Enter the loop code for obj_win_zone here.\n\n"},"rm_title":{"type":"room script","start":"# Enter the start code for rm_title here.\n\nobject_new(\"obj_generictext\").sprite = sprite_new(\"spr_title_screen\")\nobject_new(\"obj_portal\")\n\ngametitle = object_new(‘obj_generictext’)\ngametitle.text = text_new(\"impact\", 16)\ngametitle.text.text = \"Totally Original \\n Mick & Rorty the Game\"\ngametitle.text.size = 32\ngametitle.y = 180\ngametitle.sprite_color = ‘#076807’\n\n\nplaytime = object_new(‘obj_generictext’)\nplaytime.text = text_new(\"monospace\", 16)\nplaytime.text.text = ‘[Z] = Jump\\n [X] = Shoot\\n[\u2193] = Dash’\nplaytime.text.size = 24\nplaytime.sprite_color = \"#000\"\n\nstart = object_new(‘obj_generictext’)\nstart.text = text_new(\"impact\", 16)\nstart.text.text = ‘Press [Z] to Start’\nstart.text.size = 32\nstart.y = -180\nstart.sprite_color = ‘#000’\n\n","loop":"# Enter the loop code for rm_title here.\n\nif key_is_pressed(‘z’):\n game.playing = True\n game.playtime = 0\n game.current_room = \"rm_level_01\"\n room_set(‘rm_level_01’)"},"spr_grassy_tile":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_grassy_tile.jpeg"},"spr_mm_slide":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mm_slide.png"},"spr_mm_hadouken_green":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mm_hadouken_green.png"},"spr_mm_hadouken_blue":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mm_hadouken_blue.png"},"spr_mm_hadouken_red":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mm_hadouken_red.png"},"spr_mm_hadouken_yellow":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mm_hadouken_yellow.png"},"spr_mmx_jump_shoot":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_jump_shoot.png"},"spr_mmx_charge":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_charge.png"},"obj_charging":{"type":"object script","start":"# Enter the start code for obj_charging here.\n","loop":"# Enter the loop code for obj_charging here.\n"},"spr_mmx_ssj_2":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_ssj_2.png"},"obj_special_effect":{"type":"object script","start":"# Enter the start code for obj_special_effect here.\n\ndestroy_timer = 5","loop":"# Enter the loop code for obj_special_effect here.\n\ndestroy_timer -=1\n\nif destroy_timer < 0:\n object_destroy(self)"},"obj_charging_2":{"type":"object script","start":"# Enter the start code for obj_charging_2 here.\n\n","loop":"# Enter the loop code for obj_charging_2 here."},"spr_mmx_ssj_flash":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_ssj_flash.png"},"spr_mmx_ssj_aura_blue":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_ssj_aura_blue.png"},"spr_mmx_ssj_aura_red":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_ssj_aura_red.png"},"spr_mmx_ssj_aura_yellow":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_ssj_aura_yellow.png"},"spr_mmx_ssj_aura_black":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_ssj_aura_black.png"},"spr_mmx_ssj_flash2":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_ssj_flash2.png"},"obj_dst_block":{"type":"object script","start":"# Enter the start code for obj_dst_block here.\n\n","loop":"# Enter the loop code for obj_dst_block here.\n\nself.x += xspeed\nself.y += yspeed\n\nif fall:\n yspeed -= 2\n \nif y < -1000:\n object_destroy(self)"},"spr_mmx_shoot":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_shoot.png"},"spr_mmx_stand":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_stand.png"},"spr_mmx_run":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_run.png"},"spr_mmx_hurt":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_hurt.png"},"spr_mmx_dash":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_dash.png"},"spr_mmx_jump":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_mmx_jump.png"},"spr_plant_morty":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_plant_morty.png"},"spr_seed_shot":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_seed_shot.png"},"spr_grassy_tile_purple":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_grassy_tile_purple.png"},"spr_title_screen":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_title_screen.jpeg"},"spr_plasma_explode":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_plasma_explode.png"},"obj_pc_afterimage":{"type":"object script","start":"# Enter the start code for obj_pc_afterimage here.\n\ndestroy_timer = 5","loop":"# Enter the loop code for obj_pc_afterimage here.\n\ndestroy_timer -=1\n\nif destroy_timer < 0:\n object_destroy(self)"},"obj_raycast":{"type":"object script","start":"# Enter the start code for obj_raycast here.\n\ndestroy_timer = 1","loop":"# Enter the loop code for obj_raycast here.\n\ndestroy_timer -= 1\nif destroy_timer <= 0:\n object_destroy(self)"},"spr_raycast":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_raycast.png"},"spr_raycast_red":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_raycast_red.png"},"obj_game_stats":{"type":"object script","start":"# Enter the start code for obj_game_stats here.","loop":"# Enter the loop code for obj_game_stats here."},"obj_portal":{"type":"object script","start":"# Enter the start code for obj_portal here.\n\nportal_sheet = sprite_new(‘https:\/\/i.imgur.com\/iQzEMbo.png’, 1, 75)\nportal_anim = animation_new(portal_sheet, 45, 0, 74)\nanimation_set(self, portal_anim)\n","loop":"# Enter the loop code for obj_portal here."},"obj_patchnotes":{"type":"object script","start":"# Enter the start code for obj_patchnotes here.\n\n#dec 31 2017\n #find_ground function makes the assumption the blocks \n #are made first from left then is created towards the right\n #we cannot assume this, or if we do, we must first sort\n #the blocks\n #we sorted the blocks – but for some reason he falls through\n #the ground when there is a block above him\n #-fixed\n #i have to create portals when basic shot hits ground\n #i have to make colliding with blocks stop my player\n #both above the player and right and left of the player\n #-fixed\n #the last amount of blocks are not included in the chunk\n #-fixed","loop":"# Enter the loop code for obj_patchnotes here."},"obj_portal_shot":{"type":"object script","start":"# Enter the start code for obj_portal_shot here.\n\ndestroy_timer = 60\n\ndef create_portal():\n p = object_new(\"obj_portal\")\n p.x = self.x\n p.y = self.y\n p.z = self.z\n object_destroy(self)\n \n se = object_new(\"obj_special_effect\")\n se.x = self.x\n se.y = self.y\n se.z = self.z\n \n se.sprite_xscale = self.sprite_xscale\n se.sprite_width = 1\n se.sprite_height = 1\n se.destroy_timer = 20\n \n green_plasma_sheet = sprite_new(\"spr_plasma_explode\", 1, 9)\n green_plasma = animation_new(green_plasma_sheet, 25, 0, 8)\n animation_set(se, green_plasma)\n \ndef destroy_portal_shot():\n #no portal\n object_destroy(self)\n \n se = object_new(\"obj_special_effect\")\n se.x = self.x\n se.y = self.y\n se.z = self.z\n \n se.sprite_xscale = self.sprite_xscale\n se.sprite_width = 0.5\n se.sprite_height = 0.5\n se.destroy_timer = 20\n \n green_plasma_sheet = sprite_new(\"spr_plasma_explode\", 1, 9)\n green_plasma = animation_new(green_plasma_sheet, 25, 0, 8)\n animation_set(se, green_plasma)","loop":"# Enter the loop code for obj_portal_shot here.\n\nx += xspeed * sprite_xscale\ndestroy_timer-=1\n\nif destroy_timer < 0:\n #destroy_portal_shot()\n create_portal()\n \nif collision_check(self, \"obj_nrm_block\"):#destroy_timer <= 0:\n create_portal()"},"obj_dimension_warper":{"type":"object script","start":"# Enter the start code for obj_dimension_warper here.\n\nsprite_height = 4\nsprite_width = 3\n\nwarper_sheet = sprite_new(‘spr_dimension_warper’, 1, 6)\nwarper_anim = animation_new(warper_sheet, 60, 0, 5)\nanimation_set(self, warper_anim)\n\nz = 1000\nxspeed = 0\n\nglob = self","loop":"# Enter the loop code for obj_dimension_warper here.\n\nx += xspeed\n\nblock_list_chunk = game.room_block_list_chunk\nwarper = self\nwarper_width = object_width(warper) \/2\nbl_width = object_width(block_list_chunk[0][0])\nfor block_list in block_list_chunk:\n if (warper.x > block_list[0].x – bl_width) and warper.x < (block_list[len(block_list) – 1].x + bl_width): \n #if warper within these chunk of blocks\n for block in block_list:\n if block.x + bl_width > warper.x and block.x – bl_width < warper.x:\n #if warper is within this block\n block.sprite = sprite_new(glob.get_skin_from_dimension(glob, \"block\"))\n \nif abs(x) > 20000:\n object_destroy(self)\n \n "},"obj_black_bg":{"type":"object script","start":"# Enter the start code for obj_black_bg here.\n\nwarper_left = self\nwarper_right = self\ncreated_new_warpers = False\nglob = self","loop":"# Enter the loop code for obj_black_bg here.\n\nself.sprite_width = abs(warper_left.x – warper_right.x)\n\nif self.sprite_width > 1200 and not created_new_warpers:\n #create new warpers\n created_new_warpers = True\n \n wr = object_new(\"obj_bg_warper_effect\")\n wl = object_new(\"obj_bg_warper_effect\")\n\n #move it backwards\n wr.xspeed = -16\n wl.xspeed = 16\n \n #place new warpers where your old ones used to be\n wr.x = warper_right.x\n wl.x = warper_left.x\n\n #switch warper reference to refer to new warpers\n warper_right = wr\n warper_left = wl\n \n #change the background\n glob.change_room_background(glob)\n \nif warper_right.x < warper_left.x:\n object_destroy(warper_right)\n object_destroy(warper_left)\n object_destroy(self)"},"spr_black_dot":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_black_dot.png"},"rm_level_02":{"type":"room script","start":"#","loop":"# Enter the loop code for rm_level_02 here.\n"},"obj_bg_warper_effect":{"type":"object script","start":"# Enter the start code for obj_bg_warper_effect here.\n\nsprite_height = 4\nsprite_width = 3\n\nwarper_sheet = sprite_new(‘spr_dimension_warper’, 1, 6)\nwarper_anim = animation_new(warper_sheet, 60, 0, 5)\nanimation_set(self, warper_anim)\n\nz = 1000\nxspeed = 0","loop":"# Enter the loop code for obj_bg_warper_effect here.\n\nx += xspeed"},"obj_global_vars":{"type":"object script","start":"# Enter the start code for obj_global_vars here.\n#this room stores all the variables for the game.\n#right now, the game script holds some vars and the room\n#script holds some vars, but we want to eventually push everything\n#into this object\n\ndef reset_bg_size(glob):\n rmh = glob.room_height\n objh = object_height(glob.bg[0])\n sprh = glob.bg[0].sprite_height\n ratio = objh \/ sprh\n glob.bg[0].sprite_width = rmh \/ ratio\n glob.bg[0].sprite_height = rmh \/ ratio\n\ndef change_room_background(glob):\n animation_set(glob.bg[0], glob.get_skin_from_dimension(glob, \"bg\"))\n glob.reset_bg_size(glob)\n #glob is the \"global object\", aka self, but due to \n #the way pixelpad handles scoping, we have to pass it\n #through the argument\n \ndef get_skin_from_dimension(glob, name):\n if glob.current_dimension == \"c137\":\n if name == \"block\":\n return \"spr_grassy_tile\"\n if glob.current_dimension == \"purple\":\n if name == \"block\":\n return \"spr_grassy_tile_purple\"\n if glob.current_dimension == \"toxic\":\n if name == \"block\":\n return \"spr_grassy_tile\"\n \n if glob.current_dimension == \"c137\":\n if name == \"bg\":\n return glob.aztec\n if glob.current_dimension == \"purple\":\n if name == \"bg\":\n return glob.deer_lake\n if glob.current_dimension == \"toxic\":\n if name == \"bg\":\n return glob.waterfall\n\naztec_waterfall_sheet = sprite_new(‘https:\/\/i.imgur.com\/paEH0DW.png’, 1, 8)\naztec = animation_new(aztec_waterfall_sheet, 10, 0, 7)\n\ndeer_lake_sheet = sprite_new(‘https:\/\/i.imgur.com\/jUQsNKI.png’, 1, 8)\ndeer_lake = animation_new(deer_lake_sheet, 10, 0, 7)\n\nwaterfall_sheet = sprite_new(‘https:\/\/i.imgur.com\/yDvaADR.png’, 1, 10)\nwaterfall = animation_new(waterfall_sheet, 10, 0, 9)\n\ncurrent_dimension = \"c137\"\nroom_height = 800\n\nbg = []\nbg[0] = object_new(\"obj_bg_layer\")\nbg[0].x = 0\nbg[0].y = 0\nbg[0].z = -1000\nbg[0].sprite_height = 1\nbg[0].sprite_width = 1\n\nbg[0].sprite = sprite_new(\"spr_black_dot\")\n#animation_set(bg[0], aztec)\nself.reset_bg_size(self)\n\n\n\n\n\n\n\n\n","loop":"# Enter the loop code for obj_global_vars here."},"spr_dimension_warper":{"type":"image","uri":"https:\/\/pixelpad.io\/wp-content\/uploads\/project_assets\/10\/74611\/spr_dimension_warper.png"}}

0
74611