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 to randomly spawn spinning coins in area?

Hi all.

I would like to be able to spawn spinning coins in an area. I have taken a look at the exaple contents "random mesh spawn" however that only spawns static meshes. I have a spinning coin by itself in a seperate blueprint as well. I have tried modifing the exaple script as well, but to no avail.

Any thoughts or suggestions?

Product Version: UE Github Master branch
more ▼

asked Oct 25 '16 at 02:40 PM in Blueprint Scripting

avatar image

3 4 7 9

avatar image RUWD Oct 25 '16 at 06:00 PM

The below answers have solved this, at least to my satisfaction. IDK how to mark as solved :/

avatar image GigasightMedia Oct 25 '16 at 06:08 PM

You can vote answers up or down by clicking the arrows above or below the number next to the answer. You can accept an answer by clicking the check mark.

Glad you got what you needed!

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

2 answers: sort voted first

Most of that example should work the same; you just want to use SpawnActor to spawn a new instance of your coin blueprint.


Is there something else you're having trouble with?

Can you post what you have so far in your script?

more ▼

answered Oct 25 '16 at 02:53 PM

avatar image

1.7k 43 12 61

avatar image Nken418 Oct 25 '16 at 03:26 PM

Yes I would use the spawnactor (your spinning coin in this instance) and for the location you can set lie x and y values to be random integers between a range.

avatar image RUWD Oct 25 '16 at 04:38 PM

Hi peeps,

OK I will do that as its seems like the general consensus. Here is what I have had so far, (simple) for the spinning coin, just a static mesh with logic on event tick, also i was just trying to modify the example script for random static mesh (posting pic but again this is just stock, maybe useful to someone who's stumbling through for answers...)

alt text: alt text

ue4coins.jpg (345.9 kB)
coins2.jpg (407.2 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Ok Yes thanks to Nken418 , GigasightMedia !!

Ok got it working, don't know if it is 100% correct way to do it, but using the input from the above peeps, I have been able to achieve the spinning coin result that I want. More or less combining the info from the above web page and adding it with the example contents "random static mesh spawn".

Here is what I have implemented now: alt text And here are the results, sorry not a yt vid, but proof of concept: alt text alt text

coin3.jpg (45.6 kB)
coin4.jpg (38.8 kB)
coin5.jpg (564.4 kB)
more ▼

answered Oct 25 '16 at 05:58 PM

avatar image

3 4 7 9

(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