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"

Need help with a more elegant Solution

I'm working on a card game and i got everything working. A wheel spins and lands on a color which draws a card for the player. The card is random and I currently use a switch on int to determine which card.

So this is what i need help with.

1) Is it a way that i can use the information in the data tables instead of Switch on int to choose a random card? (I got a lot of cards and it gets messy in my blueprint fast)

2) I would like to use the data table to assign specific cards to different players. example, Card X can only be drawn by Player 1. Previously i have made separate switches for player 1 and 2 but this also gets messy fast.

i'm including some screen shots to help clarify.

Switch So this is my switch on Enum system. This gets very messy and is very clunky to edit. In the NewMacro_1 I choose a random int in range based on the player level. If i was to add a new card to the list i would have to change all the values.

alt text I'm using a set name that casts to the player character to Choose the card in the Data table. This works "fine" everytime i add a card i have to type in the name of the Row it's placed in. I would like this to be automated. So when i add a new card to the Data table it sets the correct name.

alt text This is my card data table. I use it to determine which Widgets that needs to be displayed.

alt text Here is the table. Any suggestions on how to make this system better is greatly appreciated. I'm about to add like 100 new cards and would like the system to be ready for the influx.

Product Version: UE 4.17
uten-navn-1.png (76.8 kB)
uten-navn-2.png (242.0 kB)
uten-navn-3.png (131.1 kB)
uten-navn-4.png (30.0 kB)
more ▼

asked Nov 17 '18 at 11:44 AM in Blueprint Scripting

avatar image

24 1 1 5

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

0 answers: sort voted first
Be the first one to answer this question
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