Knowledge base
Knowledge base
Knowledge base
Free, anonymous browsing of Unreal Engine Blueprint examples, node references, and best practices. The same content the WoalzCraft plugin uses to generate Blueprints.
20 results for drain
Pattern: Variables bIsSprinting(bool), Stamina(float)=100, MaxStamina(float)=100, SprintSpeed(float)=1200, WalkSpeed(float)=600, DrainRate(float)=20, RecoverRate(float)=10. Sprint pressed: bIsSprinting=true → SetMaxWalkSpeed(SprintSpeed). Released: bIsSprinting=false → SetMaxWalkSpeed(WalkSpeed). Tick: Branch(bIsSprinting) → Stamina -= DrainRate*DT. Else: Stamina += RecoverRate*DT. Clamp(0, Max). If Stamina<=0 → force stop sprint.
Macro. Enter only passes through when gate is open.
GateUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 7mo agostring
BranchUE 5.3, 5.4, 5.5, 5.6, 5.7updated 7mo agoPattern: InputAction Fire → GetMesh → GetSocketTransform(InSocketName='MuzzleSocket') → BreakTransform(outputs Location, Rotation) → MakeTransform(Location=SocketLocation, Rotation=SocketRotation) → SpawnActorFromClass(Class=BP_Projectile, SpawnTransform=Transform). Key: GetSocketTransform must be called on the SkeletalMeshComponent (GetMesh()), not the actor. Use 'World' TransformSpace. SpawnActorFromClass takes a full Transform, not separate Location/Rotation.
Macro. Call Reset input to allow re-triggering.
DoOnceUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 7mo agoMultiGateUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 7mo agoLess_FloatFloatUE 5.3, 5.4, 5.5, 5.6, 5.7updated 7mo agoGateUE 5.3, 5.4, 5.5, 5.6, 5.7updated 7mo agoDealing damage: Event → ApplyDamage(TargetActor, BaseDamage, InstigatorController, DamageCauser, DamageTypeClass). Receiving: EventAnyDamage → Damage output → Subtract_FloatFloat(CurrentHealth, Damage) → FClamp(Result, 0, MaxHealth) → SET CurrentHealth → Branch(CurrentHealth <= 0) → True: DestroyActor. Initialize CurrentHealth=MaxHealth in BeginPlay.