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"

How do I increase the amplitude of a change the closer to the centre of radius a character is?

Hi there,

I have a character (Player1) which slows the movement of other characters when they are in range of the TriggerVolume attached to Player1. How would I create a system whereby pawns are slowed down more the closer to the centre of the volume they are? Could this be done in blueprints?

This is what I have at the moment- how do I build on this to add my intended effect? Any help is appreciated!

https://i.imgur.com/hASXc3u.png

Product Version: UE 4.18
Tags:
more ▼

asked Feb 14 '18 at 09:10 PM in Blueprint Scripting

avatar image

KitLUL
1 1 4

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

2 answers: sort voted first

I had a Similar Issue Once.

I wanted a grande that caused higher damage based on how close the character was to the actual grenade.

Here was my creative solution.

I added spherical overlaps at different radius's. and took the max damage number and split it between all radius's

500 damage @ 5 radius's 100 damage a radius

then when it exploded it got all players and actors within each radius and applied there damage.

alt text

https://blueprintue.com/blueprint/z13akj5e/

So with this idea you could do the same for your character and anyone who enters the box get slowed by100 and then if they are within 2 boxes there slowed by 200 etc etc..

Hope this gives you a direction to go :-)

more ▼

answered Feb 14 '18 at 09:26 PM

avatar image

Exonfluxx
384 1 5 8

avatar image KitLUL Feb 14 '18 at 10:10 PM

Seems like that would do the trick- thank you for a fast reply!

avatar image Exonfluxx Feb 14 '18 at 10:12 PM

Glad I could help.

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

first i apologize for posting on a resolved question. that said an alternative solution that would create the slowing effect with a better gradient would be to get the overlapping actors location then calculate the distance between the overlapping actor and the collision volumes center. once you have the distance you would then normalize it. this would give you a number between 1 and 0 which you could then use to restrict the characters movement through the max walk speed or time dilation. this would give you a constant gradient rather than the stepped effect of other answers.

The picture below shows one implementation of this.

alt text

capture.png (256.5 kB)
more ▼

answered Feb 15 '18 at 04:13 AM

avatar image

ThompsonN13
10.1k 33 10 25

avatar image Exonfluxx Feb 15 '18 at 02:26 PM

Hi,

I considered this but he stated that he wanted something when approaching the character in question. So my thought was a stationary or moving boss that he wanted to have effect players in range. I have a tendency to try to make things reside on what is causing the effect. part of old OOP training I guess so I offered what I would have done for something like that. We all have unique ways of doing things and that is what makes collective minds better then one.

But this is unreal and there is always 50 different ways to skin a cat and your solution might be what the next person is looking for.

its always good to have more then one mind thinking about something :-)

And your input is always invaluable ThompsonN13 :-) Thank you.

avatar image ThompsonN13 Feb 15 '18 at 04:01 PM

i agree that there are many ways to accomplish the same thing and i also agree on putting the script on what is causing the effect in most cases. this method would work on a boss and would require only one extra collision volume instead of the several you had. i post it merely as an alternative to what you wrote. the method i suggested is more of a gradient where yours is stepped so future readers may be looking for one style over the other.

In my opinion my method is smoother and yours would be better performant. also i totally know what you mean about OOP i do the same myself.

(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