Announcement

Collapse
No announcement yet.

Calling a function on disconnect [solved]

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

  • replied
    Well, I figured out a way to do it, thanks to UnrealWiki. In case anyone's wondering, I now have it set up like so:

    When the mutator spawns, it spawns a dummy playercontroller. The playercontroller class has the native GetEntryLevel() function. The dummy playercontroller then spawns an actor in the Entry level so it isn't garbage-collected, then destroys itself. That actor doesn't do anything until the user returns to the menu, when it calls the function and then destroys itself.

    Whew.

    Seems like a lot of work to do something relatively simple...

    Leave a comment:


  • replied
    It's all garbage collected.

    What I really want to do is have this function (I can put it anywhere) call:

    when the level is exited

    OR

    When the next level loads, but it needs to be able to be called without a mutator.

    I'm thinking that this could be done by having the mutator spawn a class that won't be garbage-collected and have the function in that class. Make the class figure out when the level is destroyed, call the function, then destroy itself.

    Leave a comment:


  • replied
    Nope. Tried it.

    It may not be possible, looks like objects aren't destroyed, but the whole level and everything is thrown away natively. Or something.

    Leave a comment:


  • replied
    NotifyLogout() ?

    Leave a comment:


  • started a topic Calling a function on disconnect [solved]

    Calling a function on disconnect [solved]

    Does anyone know how to call a function when the user Forfeits/Disconnects (preferably in the mutator class)? Destroyed() is not called. I'm out of ideas.
Working...
X