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"

Help with checkpoint respawn mechanic, blueprint, 2d Sidescroller

I am using the respawn mechanic from this tutorial https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/RespawnPlayer/Blueprints/ successfully (see respawn 2dsidescrollergamemode blueprint.png attached) but I wanted to be able to update respawn location via level blueprint (see respawn lvl_00 blueprint.png attached) so that when the character (BP_Dude) collides with trigger box (Checkpoint_1 highlighted Purple) it will update the spawn transform location (where character respawns, highlighted yellow) to the location of the empty actor (Checkpoint_1_Respawn, highlighted green). I get the following error:

Error This Blueprint (self) is not a 2DSideScrollerGameMode_C, therefore 'Target' must have a connection. Error Variable node Set uses and invalid target. It may depend on a node that is not connected to the excecution, and got purged.

I tried entering "Get player character" return variable, get BP_dude and "Cast to BP_dude" outputs as the target nodes but none would connect to target input for spawn transform location. Is this not the proper way to change the input for "Spawn Transform Location?"

I really want to try to do it this way to simplify what I need to add to level blueprints for checkpoints.

Let me know if you have any questions.

Any ideas? thanks guys.

alt text

alt text

Product Version: UE 4.16
more ▼

asked Jun 27 '17 at 08:42 PM in Blueprint Scripting

avatar image

1 1 2 3

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

1 answer: sort voted first

Well, think again. Where do you save your Transform?

*(Hint: Your error tells you which class you need)

more ▼

answered Jun 27 '17 at 09:54 PM

avatar image

4.1k 88 38 152

avatar image Matticus2020 Jun 28 '17 at 12:27 AM

Transform is in the parent class blueprint. Does that mean that I can't do the second part in the lvl blueprint? Or do I need to set up an interface? Ok, I am pretty nubish here, so I'm gonna watch this lesson on Blueprint Communication and come back later.



avatar image Matticus2020 Jul 02 '17 at 01:10 AM

I found a solution. I didn't have to make any changes to the 2dsidescrollergamemode blueprint and instead creating a blueprint for a trigger box which I named checkpoint. I have attached it here for anyone that it would benefit. Not tooting my own horn, but I think it's pretty nice. I tested to see if passing through a second or third checkpoint and then dying would respawn to first checkpoint. It respawns to last checkpoint accurately. However if you return to a prior checkpoint it will respawn you to that one.

alt text

(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