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"

Each time x increases by a certain amount, set y

With blueprints, I'm currently trying to do something such as:


x is an integer that increases by 1 every tick.

every time x reaches 10, 20, 30, 40, etc; set y=x/10


Unfortunately, I'm struggling to understand how I should check when x has reached each interval of 10.

I figured I should probably use a ForLoop node, but then I realised I really had no idea how to connect it or what expression I should use to check the values of x.

I hope I was able to word myself appropriately, please let me know.

Product Version: UE 4.18
Tags:
more ▼

asked Nov 11 '17 at 11:27 AM in Blueprint Scripting

avatar image

NerArth
8 2 2

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

1 answer: sort voted first

This should work:

alt text

capture.png (45.7 kB)
more ▼

answered Nov 11 '17 at 12:02 PM

avatar image

Everynone
14.8k 77 25 62

avatar image NerArth Nov 11 '17 at 12:31 PM

Thanks; I think it was the modulus node (that I didn't know about) that I really needed for my full blueprint context, so I looked up now how this works.

I asked the question in a generic way because I know my game's context won't be the same as what someone else might need.

In my game I increase population every few seconds, and so I need to increase a money multiplier value for each increase of 10 in population. I think I can see how I'll do this now, so thanks again.

(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