MattParticipantMay 26, 2014 at 4:40 pm #81331
I have a board game that I am in the process of self publishing. I want to use Kwiksher to create an interactive rules book app. That way I can tell the story/theme of the game along with the rules & faqs via the app.
Is there a way to create dice in Kwiksher? My game requires special dice and an app that would allow users to “roll” virtual dice would save me a ton on printing/production costs.AdministratorKeymasterMay 26, 2014 at 6:01 pm #81341
Natively Kwik does not offer any feature like the one you need. You will need to use external code to create your dice. Not a big deal but you will need to learn about random selection.
If you want to create something without ANY code, you should try something like this (never tested but I believe it will work):
– for example, if your dice has 2 numbers (just to facilitate the example), you create the image for number 1 and image for number 2 (in different layers);
– Hide both layers;
– create an action and call it dice1 (for the number 1). Set it like this:
1) Hide layer 2 (the one with image of dice 2)
2) Show layer 1 (the one with image of dice 1)
– do the same for the dice2
– create another action and name it dice
– use the option Play Random (then enter the actions dice 1 and dice 2)
in order to “play with the dice” you can create a button (or shake interaction) that calls the action dice (which will pick action dice1 or dice2)
hope it helpsDELIVERANCE98ParticipantAugust 9, 2014 at 10:26 pm #82613
Hi, im intrested in a similar way to do it.
I want to make a dice / card whatever of 8 or 10 posible outcomes, is it posible?
should i follow some specific tutorial for that?
Thank you.AdministratorKeymasterAugust 11, 2014 at 9:46 am #82620
there is no tutorial for that. you will need to use external code for that. For example, externally to Kwik, create a .txt or .lua file with the following code:
local dice = math.random(8)
the math.random above will find a number between 1 and 8 and will keep it in the variable called dice.
Then, create an action in Kwik and name it rollDice. Add the follwoing:
- CODE add external code above
- CONDITION if dice EQUAL 1
- do whatever you want to do if the dice is 1
- CONDITION ELSE if dice EQUAL 2
- do whatever you want to do if the dice is 2
- repeat it until dice equals 8
- CONDITION END IF
You must be logged in to reply to this topic.