How do I textbox /roll

Get help using Construct 2

Post » Sun Aug 31, 2014 2:01 am

i want ot make simple dice roll text?? when you tape /roll on Textbox and press Enter..Then -- view a random number 1-6 to Text object

i creat a global text dice = "/rolld6"
Textbox | Text is dice(case insensitive) | Text | Set text to floor(random(1,6))
but this not working .he show me a count number run 1-6 over and over
Last edited by CBelle on Sun Aug 31, 2014 2:20 am, edited 2 times in total.
B
17
S
7
G
7
Posts: 205
Reputation: 5,335

Post » Sun Aug 31, 2014 2:11 am

random(x)
Generate a random float from 0 to x, not including x.


Seems to work as documented?
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sun Aug 31, 2014 2:44 am

still number count over and over..only if i press X button from textbox the numbers stop counts..hmm..meaby i need to make arrays for work with press enter ?or need to make a button to stop counts??
B
17
S
7
G
7
Posts: 205
Reputation: 5,335

Post » Sun Aug 31, 2014 3:21 am

I see, I think posting your capx would probably be the quickest way to solve the issue.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sun Aug 31, 2014 5:40 am

Maybe you just need to add a "trigger once while true" condition?
B
18
S
4
Posts: 87
Reputation: 1,199

Post » Sun Aug 31, 2014 12:38 pm

check it..
You do not have the required permissions to view the files attached to this post.
B
17
S
7
G
7
Posts: 205
Reputation: 5,335

Post » Sun Aug 31, 2014 1:13 pm

do it like this
You do not have the required permissions to view the files attached to this post.
Image Image Image
B
43
S
22
G
15
Posts: 383
Reputation: 12,262

Post » Mon Sep 01, 2014 12:38 am

ty alot.. :)
B
17
S
7
G
7
Posts: 205
Reputation: 5,335


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests