Untitled
unknown
plain_text
a month ago
2.8 kB
2
Indexable
Never
bool USkillSlotAction_MoveUP::ClickAction(ETriggerEvent InTriggerEvent, bool InIsShiftedDown, bool InIsCtrlDown) { switch (InTriggerEvent) { case ETriggerEvent::None: break; case ETriggerEvent::Triggered: break; case ETriggerEvent::Started: //-ADD MOVEMENT TAG if (CheckIfCanMove()) { CharacterPlayerBase->AbilitySystemComponent->SetTagMapCount(DevSettings->IsRunningTag, 1); return true; } else { CharacterPlayerBase->AbilitySystemComponent->SetTagMapCount(DevSettings->IsRunningTag, 0); } case ETriggerEvent::Ongoing: if (CheckIfCanMove()) { //-GET FORWARD VECTOR FRotator NewRotator(0.0f, CharacterPlayerBase->GetControlRotation().Yaw, 0.0f); FVector ForwardVector = NewRotator.Vector(); if (Character_PawnMovementComponent != nullptr) { Character_PawnMovementComponent->StopActiveMovement(); } CharacterPlayerBase->AddMovementInput(ForwardVector,1); CharacterPlayerBase->AbilitySystemComponent->SetTagMapCount(DevSettings->IsRunningTag, 1); return true; } else { CharacterPlayerBase->AbilitySystemComponent->SetTagMapCount(DevSettings->IsRunningTag, 0); } break; case ETriggerEvent::Canceled: //-REMOVE MOVEMENT TAG CharacterPlayerBase->AbilitySystemComponent->SetTagMapCount(DevSettings->IsRunningTag, 0); return true; break; case ETriggerEvent::Completed: break; default: break; } return false; }
Leave a Comment