x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Destroy All actors of class an area

Hello! I'm looking to make sure when I destroy all actors of my class it is not going server wide but is being replicated and called from the server if that makes any sense

Queen spawns castle

Human player kills Queen

Queens castle destroyed event

More than 1 queen spawning on a server using the same actors

So even with tags, don't the other duplicate Queens get the same tags and all castles are destroyed server wide at the same moment?

I had a crazy idea where I gave each building a random float on spawn and checked that against destroying actor, wanted to get some professional advice before I winged it. alt text

alt text

alt text

Product Version: Game Mod
Tags:
more ▼

asked Sep 22 '15 at 05:20 AM in Blueprint Scripting

avatar image

Samson F.
56 29 17 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

You could store the owning Queen's reference in the castle actor, either as the Owner or in a custom variable. Either way, when the Queen is killed, you loop over all castles and destroy the one(s) whose owning Queen is the one that was killed. (You'll need to make sure that the Queen actor only gets destroyed after all her castles have been destroyed.)

A slightly more complicated but more flexible way would be to add an event dispatcher to the Queen to inform any actor "listening" when the Queen is killed.

alt text

Then you create a custom event in the Castle and define whatever you want to happen when the Queen is killed. Then you bind this custom event to the Queen's dispatcher.

alt text alt text

When the Queen is killed you send out a dispatcher call and everyone bound to this event will be informed.

alt text

more ▼

answered Sep 22 '15 at 05:24 PM

avatar image

erinacea
1.8k 69 28 113

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
more ▼

answered Sep 22 '15 at 06:05 AM

avatar image

Samson F.
56 29 17 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question