Announcement

Collapse
No announcement yet.

How to control a looping particle system component in multiplayer ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to control a looping particle system component in multiplayer ?

    Hello everyone,

    I've been stuck with a problem
    I saw that to spawn an emitter in multiplayer in the unreal docs is to do this
    using an event with multicast replication
    Click image for larger version

Name:	Untitled.png
Views:	36
Size:	67.2 KB
ID:	1827515


    and it's working good but what if my emitter is a looping emitter and after sometime i want to destroy this emitter or deactivate it.
    I tried hell a lot of methods but none of them are working correctly

    does anyone know what's the correct way to handle this please ?
    thanks
    Attached Files

    #2
    Hi!

    Well I haven't done this myself but I would imagine if you have a multicast spawned emitter and it is looping(like a fire or something) then to destroy it that event also needs to be run on server to replicate to everyone. Multicast will only trigger if the players are within a certain area and if you are outside of that then you will not see the change when you get into range again.

    Comment


      #3
      Originally posted by Bobby Rösehag View Post
      Hi!

      Well I haven't done this myself but I would imagine if you have a multicast spawned emitter and it is looping(like a fire or something) then to destroy it that event also needs to be run on server to replicate to everyone. Multicast will only trigger if the players are within a certain area and if you are outside of that then you will not see the change when you get into range again.
      how would i get the reference to that emitter to destroy it ?
      the event has no return value
      and i can't store it in a variable because i use this event to spawn multiple vfx , so if i spawn 2 looping vfx , the first will be overwritten

      Comment


        #4
        Yes references can be tricky to get sometimes. Could you tell me the scenario? When will the emitters be destroyed?

        Comment


          #5
          One scenario where I would like to destroy a bunch of specific actors: I have a mine that explodes and destroys actors within a certain area. I use a collision sphere to store references to the actors that I want to destroy. I store these in a array of actor variables and when its time to blow them up I just do a for-each-loop and "destroy actor". If the actor leaves the sphere before the its time to blow I remove the actor from the array. You could also do this with line-traces or whatever you want depending on your scenario.

          Comment


            #6
            my scenario is that my character will have an empowered attack for a certain time , but this time is variable depending on other factors in the game , so i use a looping vfx to indicate that and once the the empowerment is done i destroy the vfx , it worked will in offline , but i cant get it working in multiplayer , strange behaviour , i destroy using a multicast event like i did with the spawn emitter , and the reference is there but still wont get destroyed

            Comment

            Working...
            X