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"

Save player location and teleport back to that location

Hello,

I'm trying to figure out how to setup the following:

I'm on a ledge, I press E(double tap or single for now) now my character's position is saved after pressing E.

I fall off the ledge, or go somewhere in the map, press another input(double tap F or single for now) and then my character teleports back to where I saved with E.

Any pointers or directions would be lovely!

Product Version: UE 4.10
Tags:
more ▼

asked Jan 04 '16 at 05:44 AM in Blueprint Scripting

avatar image

SyncFx
8 3 5 6

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

2 answers: sort voted first

Hi man , You can store your location in a variable vector type. Add this vector call it "OLDlocation". When you pressed "E" set the OLDlocation with your location with the node "get actor location." When you press "F" set your actor world location to your OldLocation.

To use the key press you have to enable the input on that actor. If you are using a pawn you need to possess it.

more ▼

answered Jan 04 '16 at 01:30 PM

avatar image

Est_engine
1.2k 58 12 62

avatar image SyncFx Jan 04 '16 at 02:43 PM

Hello, thank you for the reply, I manged to get it working with the following image: alt text

However, as you can see with the last set of code, is that when I press E, it is destroying everything including the one I just spawned. I'm wanting to destroy all in the world/map but the one I just spawned, any ideas?

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

First, if you have just one checkpoint. there is no purpose in using an array . You should just relocate your checkpoint. instead of spawning it

If you want more than one check point , and your question is how i keep the last i used. Since we dont know in wich way the get all actor of class order the checkpoint. You could just get their location first, check wich one is the nearest, and kill all but that.

However i suggest you to keep just 1 checkpoint spawned, or just use a variable in your char. to store the checkpoint location.

more ▼

answered Jan 04 '16 at 03:11 PM

avatar image

Est_engine
1.2k 58 12 62

(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