I am Arne Olemans, I always dreamed of world domination, but my mother refused to fund those dreams. So I became a curious and driven individual with a lifelong passion for exploring technology and the world around me. From a young age, I've been fascinated by software and technology, starting with my early days of tinkering with Nintendo games and the family desktop PC. This curiosity has fueled my journey into understanding and creating within the software developent space with a special intrest in gameplay programming and game engine development!
Contact Me!
UPROPERTY(EditDefaultsOnly, Category = "Gameplay Effects")
TSubclassOf<UGameplayEffect> FullStatEffect;
UPROPERTY(EditDefaultsOnly, Category = "Gameplay Effects")
TSubclassOf<UGameplayEffect> DeathEffect;
UPROPERTY(EditDefaultsOnly, Category = "Gameplay Effects")
TArray<TSubclassOf<UGameplayEffect>> InitialEffects;
//Abilities that you already have from the beginning of the game
UPROPERTY(EditDefaultsOnly, Category = "Gameplay Abilities")
TMap<ECAbilityInputID, TSubclassOf<UGameplayAbility>> OnSpawnBasicAbilities;
UPROPERTY(EditDefaultsOnly, Category = "Gameplay Abilities")
TMap<ECAbilityInputID, TSubclassOf<UGameplayAbility>> InputBasicAbilities;
//Abilities you learn during game
UPROPERTY(EditDefaultsOnly, Category = "Gameplay Abilities")
TMap<ECAbilityInputID, TSubclassOf<UGameplayAbility>> AddedAbilities;
void UTfsAbilitySystemComponent::AddInputAbility(ECAbilityInputID InputID, const TSubclassOf<UGameplayAbility>& GameplayAbility)
{
RemoveInputAbility(InputID);
GiveAbility(FGameplayAbilitySpec(GameplayAbility, 0, static_cast<int32>(InputID), nullptr));
InputBasicAbilities.Add(InputID, GameplayAbility);
}
UCLASS()
class THREEFORSIMPLE_API UTfsAttributeSet : public UAttributeSet
{
GENERATED_BODY()
public:
ATTRIBUTE_ACCESSORS(UTfsAttributeSet, Health)
ATTRIBUTE_ACCESSORS(UTfsAttributeSet, MaxHealth)
//Config of how property are getting replicated
virtual void GetLifetimeReplicatedProps( TArray< class FLifetimeProperty > & OutLifetimeProps ) const override;
virtual void PreAttributeChange(const FGameplayAttribute& Attribute, float& NewValue) override;
virtual void PostGameplayEffectExecute(const struct FGameplayEffectModCallbackData& Data) override;
private:
UPROPERTY(ReplicatedUsing = OnRep_Health)
FGameplayAttributeData Health;
UPROPERTY(ReplicatedUsing = OnRep_MaxHealth)
FGameplayAttributeData MaxHealth;
private:
UFUNCTION()
void OnRep_Health(const FGameplayAttributeData& OldValue) const;
UFUNCTION()
void OnRep_MaxHealth(const FGameplayAttributeData& OldValue) const;
};
//Predication key: The one that send out the ability has the prediction key and can therefor already play the animation locally and correct it once if needed the server executed the animation and replicates the data back
if (HasAuthorityOrPredictionKey(ActorInfo, &ActivationInfo))
{
//Plays on server but automatically replicates it to all clients
UAbilityTask_PlayMontageAndWait* PlayMeleeAttackMontageTask = UAbilityTask_PlayMontageAndWait::CreatePlayMontageAndWaitProxy(this, NAME_None, MeleeAttackMontage);
PlayMeleeAttackMontageTask->OnBlendOut.AddDynamic(this, &UGA_MeleeAttack::K2_EndAbility);
PlayMeleeAttackMontageTask->OnCancelled.AddDynamic(this, &UGA_MeleeAttack::K2_EndAbility);
PlayMeleeAttackMontageTask->OnCompleted.AddDynamic(this, &UGA_MeleeAttack::K2_EndAbility);
PlayMeleeAttackMontageTask->OnInterrupted.AddDynamic(this, &UGA_MeleeAttack::K2_EndAbility);
PlayMeleeAttackMontageTask->ReadyForActivation();
UAbilityTask_WaitGameplayEvent* WaitTargetingEventTask = UAbilityTask_WaitGameplayEvent::WaitGameplayEvent(this, GetMeleeAttackComboEventTag(), nullptr, false, false);
WaitTargetingEventTask->EventReceived.AddDynamic(this, &UGA_MeleeAttack::MeleeAttackComboEventReceived);
WaitTargetingEventTask->ReadyForActivation();
}
if (K2_HasAuthority())
{
UAbilityTask_WaitGameplayEvent* WaitTargetingEventTask = UAbilityTask_WaitGameplayEvent::WaitGameplayEvent(this, GetMeleeAttackTargetEventTag());
WaitTargetingEventTask->EventReceived.AddDynamic(this, &UGA_MeleeAttack::DoDamage);
WaitTargetingEventTask->ReadyForActivation();
}
void ATfsGameState::UpdatePlayerSelection(const APlayerState* PlayerToUpdate, const uint8 DesiredSlot)
{
if (!HasAuthority() || IsSlotOccupied(DesiredSlot))
return;
FPlayerSelection* FoundExistingPlayerSelection = PlayerSelectionArray.FindByPredicate([&](const FPlayerSelection& PlayerSelection)
{
return PlayerSelection.IsPlayerLinkedToSelection(PlayerToUpdate);
}
);
if (FoundExistingPlayerSelection)
{
FoundExistingPlayerSelection->SetSlotID(DesiredSlot);
}
else
{
PlayerSelectionArray.Add(FPlayerSelection(DesiredSlot, PlayerToUpdate));
}
OnPlayerSelectionUpdated.Broadcast(PlayerSelectionArray);
}
uint32 FInventoryItemHandle::GenerateNextID()
{
static uint32 StaticID = 1;
return StaticID++;
}
Rev::GameObject* exampleObject = new Rev::GameObject{};
scene->addGameObject(exampleObject);
GameObject->AddComponent<Component class name>(GameObject, Component constructor arguments);
player->addComponent<Rev::CompCollision>(player.get(), physicsHandle, false, false, glm::vec3{0.1f, 1, 0.1f});
Rev::Texture* enemyTexture = Rev::Rev_CoreSystems::pResourceManager->LoadResource("Enemy", enemyDoomFilePath);
Rev::TextureShader* textureShader = new Rev::TextureShader{};
Floor->addComponent<Rev::CompRender>(Floor, player.cameraComp, textureShader, floorTexture);
inputComp->BindKeyAction(SDL_SCANCODE_W, [playerTrans]() { playerTrans->MoveForward(1); });
scene->getPhysicsHandle();
Rev::CompCollision& bulletColl = *bullet->addComponent<Rev::CompCollision>(bullet, physicsHandle});
bulletColl.SetOnContactFunction(
[](Rev::CompCollision* other) {
Rev::GameObject& obj = *other->GetGameObject();
if (obj.m_Tag == "Enemy") obj.Destroy();
});
Rev::Rev_CoreSystems::pRevSound->LoadSound("pew", resourceFolder + SoundPew);
Rev::Rev_CoreSystems::pRevSound->PlayRevSound("pew");
Rev::Rev_CoreSystems::pUI->SubscribeElement("Health: ", &healthPlayerComp->GetHealth());
Rev::Rev_CoreSystems::pSceneManager->GetSceneByTag("GameScene")->addGameObject(bullet);