Display Random Object ?? Array Set-Up Help...

Get help using Construct 2

Post » Sat Oct 06, 2012 12:41 pm

Hey-- i posted a more current description of my help request below. Thanks && kind regards, mark-p.
markpouncey2012-10-07 20:22:57
B
12
S
3
G
3
Posts: 92
Reputation: 3,949

Post » Sat Oct 06, 2012 1:20 pm

Maybe you can post your CAPX and we can help you with what you've got.

One way to do this, is to create a list with all numbers from 01 to 49. Than use Random to pick a number in the range. Check if the number exists in the list. If so use it and delete the picked number in the list.
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Sat Oct 06, 2012 1:39 pm

Or you can add a boolean variable to the Tile sprite, call it "Displayed".

Then:

+ Tile: Is NOT displayed (invert the condition with right click)
+ System: Pick random instance.
> Do whatever you want with that tile
> Tile: Set Displayed to true
+ Else (this should run when there are no more tiles to show, basically restarting)
> Tile: Set Displayed to false (sets all tiles to show again)
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sat Oct 06, 2012 2:10 pm

-- See Below.markpouncey2012-10-07 22:00:16
B
12
S
3
G
3
Posts: 92
Reputation: 3,949

Post » Sat Oct 06, 2012 2:15 pm

More than once i have been asked to post a CAPX file, and i have one-- but don't know how to post it, i am ashamed to say. I am not getting much action off of the "insert hyperlink" button etc. && wonder how ya'll would post one if it were you < like, Um-- if you were explaining it to a moron or something, as it were then Old Chaps... > ?? Can't seem to get a pic to post either.
-- See Below.

markpouncey2012-10-07 22:01:22
B
12
S
3
G
3
Posts: 92
Reputation: 3,949

Post » Sat Oct 06, 2012 6:37 pm

http://www.scirra.com/tutorials/42/upload-your-game-to-dropbox/page-1

I know it says they removed the public folder, but I got my new dropbox account recently and it had a public folder.

B
16
S
3
G
3
Posts: 66
Reputation: 3,629

Post » Sun Oct 07, 2012 4:12 pm

Hey-- thanks buddy && i will look into this right now.
B
12
S
3
G
3
Posts: 92
Reputation: 3,949

Post » Sun Oct 07, 2012 8:18 pm

Hey-- i had an earlier post about setting up a text field that displays on a button click. I have a CAPX file but am still unsure how to post it. I have a demo file set-up now at the following link to show:
-- "http://redflagmobile.com/RedFlagMobile-Projects.html"
and is the first link folder on the left side.
The actual link to that server is:
-- "http://mpdemos-1.scienceontheweb.net/"
but FaceBook blocks this URL < says it looks "spammy" to them > so i don't often use it, but it is a good, regular link with nothing wrong and the demo is there.
O.K.-- what i have is ten instances of the same text object && each has a different value typed into the text box: "001" through "010" && each one has an instance variable "Variable1" that is a number 1 through 10 respectively && i have an Array object < 1d > that has a width of 10 and has a number 1 through 10 as the value starting at index 0.
When i click the buttons-- it displays a random instance of the text-- but i need to set the array up so's that it will not re-pick one that has already been displayed in a text box. Usually the Text objects are off-camera, but i put them on-stage in this little demo to be able to see.
Obviously, i am totally clueless about the array set-up. I am reading through the tutorial "arrays for beginners" as i am posting this-- and would be very grateful if the folks on the forum could help me set this up so's it works the right way.
kind regards, mark-p
at: "markpouncey-at-gmail-dot-com"
B
12
S
3
G
3
Posts: 92
Reputation: 3,949

Post » Mon Oct 08, 2012 1:25 pm

Hey-- i got a kind of a "Hill-Billy Work-Around" to do what i needed to do without the array object. It's kind of a "Array-That's-Not-An-Array" thanks to the new "Set Text" feature in the new build. Have submitted an example demo to The Arcade && am awaiting approval from the Boss Men. Wish i could do it "The Right Way" && will say more when that arcade demo is O.K.'ed &&
kind regards, mark-p.
B
12
S
3
G
3
Posts: 92
Reputation: 3,949


Return to How do I....?

Who is online

Users browsing this forum: YoHoho and 13 guests