Announcement

Collapse
No announcement yet.

Create an instance of something without placing it in the level?

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

    Create an instance of something without placing it in the level?

    hi!,

    simple and short, I want to create an instance of something without placing it in the actual level. For example
    the boss is killed and it gives the gamemode blueprint a simple object with values.
    Everything could be done with an actor but must be placed or spawned an actor in the level, even it isn't visible, touchable or whatever?

    #2
    You can use a Struct for that

    https://www.youtube.com/watch?v=o46ZWNqh444
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

    Comment


      #3
      More specifically, you are going to want a way to pass that struct to the game mode from the boss blueprint or whatever is tracking it being killed.

      In the game mode create a custom event, maybe call it Boss Killed. Then in the boss blueprint, have it call the Boss Killed event in game mode and either directly pass variables or just have the boss killed event lead to the specific outcome you want.

      There are numerous ways to pass data, but that is how I would do it in this case.
      Map Generator 1.0
      Map Generator 2.0
      Map Generator 3.0

      Comment


        #4
        Wouldn't a UObject be what you need? Though this thing can't be replicated, but you can simply construct one without spawning it.
        Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

        My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
        (Including 100+ Pages Multiplayer Network Compendium to get you started.)

        Comment

        Working...
        X