[UE5.4] Projectile and AOE is not working and has strange behavior (replication)

I am trying to make a projectile with an AOE upon an overlap event. This is in a replicated context. Currently and consistently the projectile spawns as desired, can collide with an actor, and damage be applied using my damage system. However, the AOE is not working properly and causes some very strange behavior as follows.

-The AOE emitter (using infinity blade resources) replicates ONLY if the shooter is hit by the projectile. AOE damage is reliably applied to everyone within radius in this case.
—Projectile damage is done to the overlapped character as expected in this case
—A debug sphere spawns only on shooter’s client
-Actors being hit by the projectile will reliably take damage applied by the projectile OR damage by the AOE, never both. very inconsistent on what is applied.
-AOE emitter will sometimes (also very unreliably) spawn twice
-fuse time does not affect outcome
-amount of projectiles spawned in the world has no impact on outcome

It is worth noting that I am replicating the Top-down template. RMB is used to move an AI character that is possessed upon spawning in the world. Have not really had an issue with anything during the project for getting things to replicate properly. BPs attached are the master projectile and master AOE.


Basic expected flow for entire event…
Input pressed>spawn projectile>projectile has overlap with any actor>projectile does damage and spawns AOE BP>AOE BP spawns an emitter and applies damage within specified radius

The magic on the client controller that initiates the entire process

I have it reliably working as it should now. I ended up rebuilding the projectile and aoe BPs, nothing really changed except for how to AOE is brought into the world. Now using a Niagara system instead of legacy emitters. System must spawn as attached otherwise VFX won’t run reliably, when it does run it will loop on infinite regardless of settings on the NS file and the “spawn system” node.

Now the actor itself will not be destroyed until after a delay that is set. Ensuring time for the VFX to finish. This is because making the system spawn as attached ties it to the projectile actor. It’s weird and I don’t like it but it works.

For spawning in the AOE:
The actor spawning just wasn’t working. Spent enough time on it and decided to just add the BP as a component that overlaps everything. The component is initially hidden. Upon revealing it during run time, it collects the array of contained actors and the end goal is met.

I might make a YT tutorial on this because it was quite the ride

Cheers

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.