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"

Simple board game

Hi, I would like to learn by making simple board game as we know from chlidhood :) First thing i want to do is moving player to specific tile by clicking on it. Could You help me and steer me what should i look foralt text THX

Product Version: UE 4.18
b1.png (679.8 kB)
more ▼

asked Mar 24 '18 at 10:04 PM in Blueprint Scripting

avatar image

1 1 2 3

avatar image Nebula Games Inc Mar 24 '18 at 10:46 PM

Well, you would need to do a few things.

  1. Use a node that "converts mouse location to world space", or "get hit result under cursor by channel/object" basically the first step is to get a world location for where you have "clicked" either by identifying the object you clicked on OR the location you clicked in #D space

  2. Once you have a location, you would want to use something like "Set Actor Location" to then move the player to the specified spot clicked on before

Obviously this is a super basic, quick and dirty train of thought for how to go about it. If you need something more in depth let me know. But that is the basics

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

1 answer: sort voted first

Hi, I decided i will keep it as easy as possible. First I get random int (1-6) and then i move my pawn to correct tile. This is probably not the way it should be done but... I made vector array with vectors of tiles. What i want to do is set actor location after I "throw dice" and get integer. This int should choose vector from array. Could You hekp me with BP's ? Now it does strange moves not related with "dice"


alt text

bb.png (773.6 kB)
more ▼

answered Mar 30 '18 at 08:40 PM

avatar image

1 1 2 3

avatar image Nebula Games Inc Mar 31 '18 at 02:21 PM

I am not understanding the problem here. It seems to be relocating the player to the appropriate cube, what are you trying to do?

avatar image Borsuk31 Mar 31 '18 at 03:02 PM

As You can see on video it send pawn to different cube as generated number It works ok when set number manualy. I dont know where i made mistakealt text

alt text


cc.png (120.2 kB)
dd.png (730.1 kB)
avatar image ThompsonN13 Mar 31 '18 at 10:03 PM

you issue here is that it is generating a random number twice. what you want to do is to have your set dice result variable just after the key input event then instead of dragging off of the random int to go to all the other things just get your variable instead. basically what you currently have going on is its getting a random number for the print string, then getting another random number for the set dice variable, and another random number for the get node. by making all those integers based on the variable the value wont change and you will have one consistent number between them all.

alt text

capture.png (127.0 kB)
avatar image Nebula Games Inc Mar 31 '18 at 11:46 PM

@ThompsonN13 is correct. You are actually pulling 2 separate random variables. I had made this tutorial for someone else who had a similar problem, it can get tricky if you are not careful. The screenshot above is correct, if you want a more in-depth explanation of this effect I have posted the link to my tutorial. It has time stamps in the description so you can skip around and find what you need.


avatar image Borsuk31 Apr 01 '18 at 11:04 AM

Thank you Guys. I didn't realized it sednds two signals from random int. So first objective is complete :) Now i will try to set dice animations

(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