Announcement

Collapse
No announcement yet.

How can i Reference a specific player in multiplayer?

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

    How can i Reference a specific player in multiplayer?

    So i'm making a system in multiplayer where a character can buy a house, or own one. He can walk up to the house, purchase it if he has the money, and now that house is owned by the player who did that. If the house is being damaged, I want to send that specific player an event like " Your house is being damaged".
    It's kind of like in age of mythology, If green team claims a town center, and greens town center is attack, it highlights on the green teams map.

    So i figure i need to reference the player that bought that House. Any Ideas on how this could be achieved?

    #2
    1) In your character blueprint create a "HouseUnderAttack" Event with Replicates set to "Run on owning client".
    2) In the house blueprint add a variable of <reference to your character class> type. Populate it when the house is created, you could use "expose on spawn" for it.
    3) When the house is being damaged, create a Get node of that character reference you've created and drag from it to call the HouseUnderAttack event on the house owner.
    MMO Starter Kit
    Dialogue Plugin
    Voxel Plugin
    Character Customization: Female
    Character Customization: Male

    Comment


      #3
      works perfectly, Thanks you so much

      Comment

      Working...
      X