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"

What's the best way to respawn a bot?

I'm trying to respawn a bot through a centralized function/custom event in the game mode. Respawning players is fine, but for some reason I need to branch out the respawning to differentiate between player and bot. If bot, I can't just destroy and respawn ai, because new player state is added (I overwrote this in c++ because I need the bot to have a player state). If I try to possess new actor with existing ai controller, editor crashes. Any thoughts on a fluid way to handle this?

Product Version: UE 4.10
more ▼

asked Mar 15 '16 at 09:50 PM in Blueprint Scripting

avatar image

1.2k 49 31 87

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

1 answer: sort voted first

You could instead of respawning them simply setup a "reset" so they aren't dead so to speak and then move them in their reset state to a new starting point so you aren't constantly spawning and destroying actors and so on. so when they "die" they go ragdoll or whatever the sequence for dying is set to and then set visibility to false on them set their world location to a respawn point and reset ragdoll to false and visibility to true and any variables back to their starting values etc, etc. Also you would never have to unpossess or repossess anything it would simply go into a "im dead" state and then be reset and pushed back out the door for more combat.

more ▼

answered Mar 15 '16 at 10:11 PM

avatar image

Black Phoenyx
4.2k 165 9 170

avatar image paradoc Mar 16 '16 at 02:42 PM

ya, this seems to be a good solution. thanks. i wonder if unreal tournament handle's their bots in the same way.

(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