Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Frisk's Inputs//
- global.InputLeft = keyboard_check(vk_left);
- global.InputRight = keyboard_check(vk_right);
- global.InputUp = keyboard_check(vk_up);
- global.InputDown = keyboard_check(vk_down);
- if (global.Chara_Mode == true)
- {
- global.Frisk_walkdown = spr_frisk_walkdown_possessed;
- global.Frisk_walkup = spr_frisk_walkup_possessed;
- global.Frisk_walkleft = spr_frisk_walkleft_possessed;
- global.Frisk_walkright = spr_frisk_walkright_possessed;
- global.Frisk_down_idle = spr_frisk_down_idle_possessed;
- global.Frisk_up_idle = spr_frisk_up_idle_possessed;
- global.Frisk_left_idle = spr_frisk_left_idle_possessed;
- global.Frisk_right_idle = spr_frisk_right_idle_possessed;
- }
- if (global.Frisk_shake == true)
- {
- if (Frisk_Shakes == 1)
- {
- x += 1;
- Frisk_Shakes = 2;
- }
- else if (Frisk_Shakes == 2)
- {
- x -= 1;
- Frisk_Shakes = 1;
- }
- }
- //Frisk's State Actions
- if (Frisk_State == PlayerStates.Normal)
- {
- //Frisk's Movement
- image_speed = 0;
- if ((global.InputUp) and not place_meeting(x, y-3, obj_solid))
- {
- y -= global.Extra_WalkSpeed;
- sprite_index = global.Frisk_walkup;
- global.Frisk_Facing_Direction = 1;
- image_speed = 1;
- }
- if ((global.InputDown) and not place_meeting(x, y+3, obj_solid))
- {
- y += global.Extra_WalkSpeed;
- sprite_index = global.Frisk_walkdown;
- global.Frisk_Facing_Direction = 2;
- image_speed = 1;
- }
- if ((global.InputLeft) and not place_meeting(x-3, y, obj_solid))
- {
- x -= global.Extra_WalkSpeed;
- sprite_index = global.Frisk_walkleft;
- global.Frisk_Facing_Direction = 3;
- image_speed = 1;
- }
- if ((global.InputRight) and not place_meeting(x+3, y, obj_solid))
- {
- x += global.Extra_WalkSpeed;
- sprite_index = global.Frisk_walkright;
- global.Frisk_Facing_Direction = 4;
- image_speed = 1;
- }
- //Facing direction
- if (global.Frisk_Facing_Direction == 1 and !global.InputUp)
- {
- sprite_index = global.Frisk_up_idle;
- image_index = 0;
- }
- else if (global.Frisk_Facing_Direction == 2 and !global.InputDown)
- {
- sprite_index = global.Frisk_down_idle;
- image_index = 0;
- }
- else if (global.Frisk_Facing_Direction == 3 and !global.InputLeft)
- {
- sprite_index = global.Frisk_left_idle;
- image_index = 0;
- }
- else if (global.Frisk_Facing_Direction == 4 and !global.InputRight)
- {
- sprite_index = global.Frisk_right_idle;
- image_index = 0;
- }
- }
- else
- {
- }
- var inst = instance_place(x, y, obj_room_transfer);
- if (inst != noone)
- {
- room_goto(inst.TargetRoom);
- }
- //Freezes the player in place
- if (Frisk_State == PlayerStates.Frozen)
- {
- //Disables movement for dialog
- global.Extra_WalkSpeed = 0;
- }
- else
- {
- global.Extra_WalkSpeed = 3;
- }
- if (Frisk_State == PlayerStates.Frozen_Invisible)
- {
- global.Extra_WalkSpeed = 0;
- }
- else
- {
- global.Extra_WalkSpeed = 3;
- }
Advertisement
Add Comment
Please, Sign In to add comment