hidden_group = ?g hidden_group.alpha(0) hide_player() offset_y = 90 extra_off = 50 extract obj_props //Portals -------------------------------------------------- $.add(obj { OBJ_ID: obj_ids.portals.TELEPORT, X: 19, Y: 0, YELLOW_TELEPORTATION_PORTAL_DISTANCE: offset_y, GROUPS: hidden_group, }) $.add(obj { OBJ_ID: obj_ids.portals.DUAL_ON, X: 30, Y: offset_y, GROUPS: hidden_group, }) $.add(obj { OBJ_ID: obj_ids.portals.WAVE, X: 15, Y: offset_y, GROUPS: hidden_group, }) $.add(obj { OBJ_ID: obj_ids.portals.SIZE_MINI, X: 15, Y: offset_y, GROUPS: hidden_group, }) //Move trigger and follow player y triggers ---------------- follow_x_group = ?g follow_y_group = ?g $.add( lock_to_player_trigger(follow_x_group,lock_x=true,lock_y=false).with(X,60).with(Y,90 + offset_y - extra_off) ) $.add( follow_player_y_trigger(follow_y_group).with(X,60).with(Y,120 + offset_y - extra_off) ) //Top and bottom blocks ------------------------------------ $.add(obj { OBJ_ID: 1, X: 60, Y: 60 - 30/4, GROUPS: [hidden_group, follow_x_group], }) $.add(obj { OBJ_ID: 1, X: 60 - 30/4, Y: 15, GROUPS: [hidden_group, follow_x_group], }) //Collision blocks ----------------------------------------- player_block = ?b collide_block = ?b $.add(obj { OBJ_ID: obj_ids.special.COLLISION_BLOCK, DYNAMIC_BLOCK: true, BLOCK_A: player_block, X: 60, Y: 30, GROUPS: [hidden_group, follow_x_group, follow_y_group] }) $.add(obj { OBJ_ID: obj_ids.special.COLLISION_BLOCK, DYNAMIC_BLOCK: false, BLOCK_A: collide_block, X: 60, Y: 64, GROUPS: [hidden_group, follow_x_group], }) //D block -------------------------------------------------- $.add(obj { OBJ_ID: obj_ids.special.D_BLOCK, SCALING: 2.0, X: 60, Y: 45, GROUPS: [hidden_group, follow_x_group], }) return { button_a: #[desc("Returns an event for when button A is pressed (the right side by default)")] () { return collision(player_block, collide_block) }, button_b: #[desc("Returns an event for when button B is pressed (the left side by default)")] () { return touch(dual_side = true) }, button_a_end: #[desc("Returns an event for when button A is released (the right side by default)")] () { return collision_exit(player_block, collide_block) }, button_b_end: #[desc("Returns an event for when button B is released (the left side by default)")] () { return touch_end(dual_side = true) }, hidden_group: #[desc("A group that is hidden (alpha = 0)")] hidden_group, }