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"

coin magnet in endless run

hi , I make endless run game and I wanna add magnet to collect coins but I cant do it , i wanna add link to know what i want . https://youtu.be/Bu9vgoIJAD4?t=1m20s

please help me :(

Product Version: UE 4.10
Tags:
more ▼

asked Jul 20 '16 at 07:36 PM in Blueprint Scripting

avatar image

ROSE_HEART
10 1 2 3

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

There is a tutorial called Battery Collector, it shows how to make a magnet like pickup effect. You will need to search for it though, I didn't find an easy link to it.

more ▼

answered Jul 20 '16 at 08:43 PM

avatar image

mikepurvis
2.5k 100 65 260

(comments are locked)
10|2000 characters needed characters left

Hi ROSE_HEART,

The way I would set this up is create an overlap sphere in the character that, when it overlaps with the coin blueprint run a custom event within the coin that lerps the coin to the location of the character on a timeline.

more ▼

answered Jul 20 '16 at 09:25 PM

avatar image ROSE_HEART Jul 20 '16 at 09:36 PM

Can you please explain it to me in a video or a photos

(comments are locked)
10|2000 characters needed characters left

Absolutely, though this is a simple example, you will need to adjust it to fit what you are doing.

First, in the coin, we set up a simple overlap that runs a timeline when the player overlaps the coin. At this moment, we don't care about the radius, just that the coin is overlapped and moved to the player when overlapped:

alt text

After this, You need to go to your player character and set up a sphere collision component with the collision set to overlap all:

alt text

In the character event graph, I have a number of functions set up to trigger the sphere to have collision on and off on a timer, to give it the feeling you would look for in a temporary buff. In the image we have a timer to count down how long the effect remains, a custom event to turn on the buff and add time if re-triggered, the actual magnet event which turns on/off collision of the larger sphere, and an input event to test.

alt text

Finally, I have set up a pickup item to trigger the magnet effect. The platform and pickup look like this:

alt textalt text

As stated previously, you will want to heavily modify this type of interaction to fit what you are attempting to accomplish. Once you have done so, you should be able to get a great variation on the types of behavior you are looking for.

coinpickup.png (171.8 kB)
magnetradius.png (252.9 kB)
playercharacter.png (284.8 kB)
platform2.png (282.7 kB)
pickupplatform.png (129.4 kB)
more ▼

answered Jul 21 '16 at 07:54 PM

avatar image Danny_r8 May 10 '17 at 12:10 PM

Hello Adam, I am having some trouble with this, as the sphere collision I created around my runner, overlaps the box collisions I have made on my platforms, that spawn new platforms when I pass over them. This then means that they are spawning much faster and begin to intersect one-another, creating a big mess. I played around with the collision presets but was unable to find a solution. I followed the tutorial by Unreal Engine on creating an endless runner, as I am very new to the software, so my game currently looks like his does after the sixth video. Any thoughts on fixing this?

(comments are locked)
10|2000 characters needed characters left
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