TobiaszPL Posted April 30, 2019 Posted April 30, 2019 This time something small :D lel this script should play magic effect on player and damage player here is script Scriptname QLG_Script_FireDamage extends Actor { Simple script to play fire effect and burn player if enter trigger } Import VisualEffect Actor Property QPlayer Auto { Player Ref. } VisualEffect Property QMagic Auto { Magic Effect to play on Player } int Property QDMG Auto ; fire damage int Property QDEL Auto ; fire damage delay Event OnTrigger( ObjectReference QRef ) If( QRef == QPlayer ) QPlayer.DamageAV( "Health" , QDMG ) QMagic.Play(QPlayer, ( QDEL + 1.8 ) ) Utility.Wait( QDEL ) EndIf EndEvent anything to fix, do better ?im not even sure it will work cause i can't test it now xD but its compiling fine :D
maxarturo Posted April 30, 2019 Posted April 30, 2019 (edited) I didn't compile it, but i've used so many times this kind of scripts that should be working just fine. Actor Property PlayerREF Auto EffectShader Property VisualFX01 Auto {Visual FX to Play when Enter Trigger on SELF} keyword property DB10MagicHeavyFire auto explosion property DB10TrapFireTriggerExplosion01 auto float property timeBeforeApply = 30.0 auto {Time that the Trigger will apply the damage after Trigger Enter. DEFAULT = 30.0} event onTrigger(objectReference triggerRef) wait(timeBeforeApply) if triggerRef as actor && !(triggerRef as actor).isDead() if !(triggerRef as actor).HasMagicEffectWithKeyword(DB10MagicHeavyFire) ; debug.Trace(self + " has applied gas to " + triggerRef) triggerRef.placeAtMe(DB10TrapFireTriggerExplosion01) VisualFX01.Play(PlayerREF) PlayerREF.DamageActorValue("Health", 100.0) endif endif endEvent Don't forget to set this in the Script's properties.Keyword = DB10MagicHeavyFireExplosion = DB10TrapFireTriggerExplosion01 You might not need:PlayerREF.DamageActorValue("Health", 100.0)Because the MagicHeavyFire & TrapFire do quite some damageAnd the:VisualFX01.Play(PlayerREF)Because the FireTriggerExplosion does a nice FX, but that is up to you. * The VisualEffects are use for Camera Attach Particles and the EffectShaders for FX to the actor (around the actor's body). Edited April 30, 2019 by maxarturo
Recommended Posts