Summary
when attempting to call fort_template_ability.Use() while providing a context with a instigator that is a player it will not work
and wont return the ability entity and wont activate any of the AbilityElements and also the ability entity wont simulate
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Scene Graph
Steps to Reproduce
using { /Fortnite.com/Abilities }
using { /UnrealEngine.com/Abilities }
using { /Verse.org/Simulation }
using { /Fortnite.com/Characters }
using { /Verse.org/Timeline }
using { /Fortnite.com/Input/Character }
using { /Verse.org/Assets }
gun_ability := class(fort_template_ability(ability_context,fort_template_ability_effect)):
@editable var ActiveEffects<override>:[]fort_template_ability_effect = array:
var InputTrigger<override> : ?input_action(logic) = option{WeaponPrimary}
MakeContext<override>()<transacts>: ability_context = ability_context{}
@editable AbilityPrefab : concrete_subtype(fort_template_ability_effect) = fort_template_ability_effect
MakeAbility<override>()<transacts>: fort_template_ability_effect =
Print("Making ability prefab")
AbilityPrefab{}
@editable var AbilityElements<override>:[]timeline_element = array:
fort_ability_projectile_point:
freeze_ability := class(fort_template_ability(ability_context,fort_template_ability_effect)):
@editable var ActiveEffects<override>:[]fort_template_ability_effect = array:
@editable var AbilityElements<override>:[]timeline_element = array:
fort_ability_status_effect_icy_feet_point{StatusEffectDuration:=Inf}
@editable var TargetQuery<override>: ?ability_target_query = option{self_ability_target_query{}}
MakeContext<override>()<transacts>: ability_context = ability_context{}
@editable AbilityPrefab : concrete_subtype(fort_template_ability_effect) = fort_template_ability_effect
MakeAbility<override>()<transacts>: fort_template_ability_effect =
Print("Making ability prefab")
AbilityPrefab{}
<# using { gc3_assets}
using { extensions_module }
using { entity_module } #>
projectile_component := class(fort_projectile_component):
Freeze : freeze_ability = freeze_ability{}
OnSimulate<override>()<suspends> : void =
OnImpactEvent.Subscribe(OnHandleCollision)
OnHandleCollision(Result:projectile_impact_result):void =
if:
Hit := Result.HitEntity?
AgentHit := agent[Hit]
FortCharacterHit := AgentHit.GetFortCharacter[]
FortCharacterEntity := FortCharacterHit.GetEntity[]
then:
Print("Ability hit valid entity")
Context := ability_context:
Instigator := option{AgentHit}
Targets := array{FortCharacterEntity}
Ability := Freeze.Use(AgentHit,Context)
if (Ability?):
Print("Able to apply ability")
else:
Print("Unable to apply ability")
Entity.RemoveFromParent()
<# spawn:
Entity.DelayedDispose(3.0) #>
else:
Print("Hit was invalid on target" + ToDiagnostic(Result.HitEntity? or false))
using this script make a subclass of the projectile_template and use that in the gun_ability, then shoot a NPC, they should be granted the ice feet effect, then shoot a player and they do not recieve the ice feet effect
Expected Result
hitting a player and a NPC with the projectile will cause them both to develop the effects of freeze_ability
Observed Result
only the NPC will get icy feet and the player will fail the Use
Platform(s)
ALL