Announcement

Collapse
No announcement yet.

The dino arena example spawns random weapons on to the ground... how do you do this?

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

    The dino arena example spawns random weapons on to the ground... how do you do this?

    If you have played with the dino arena example you know what I'm talking about.

    It seems like the "Note" objects are controlling the game spawning in random weapons and ammo. How is this done?

    Better yet...is there anyway to populate someones inventory when the spawn?

    I'm making a pvp map and I need to get some basic weapons into the hands of the players immediately after they spawn.

    Thanks for the advice!

    #2
    The DinoArena map does this in the level blueprint's event graph (specifically in the EventTick event). The important block is "Static Drop New Item"; the "For Actor" entry (which is getting references to the Note objects in the world) controls, among other things, the position relative to which items appear.

    Getting a reference to the ShooterGameMode and binding a custom event to OnShooterCharacterSpawned will let you grab the ShooterCharacter that gets spawned. You can then grab their inventory component and invoke BPIncrementItemTemplateQuantity to give them some items.

    Comment


      #3
      Thanks for your response that helps a lot!

      Comment

      Working...
      X