How do I makegrid and rotate sprites in radom grid spot?

Get help using Construct 2

Post » Fri Aug 29, 2014 2:23 pm

Hello,

I spend more than two hours in a forums and tutorials looking in to how to make grid and rotate sprites in random spots. I got more confused then any good came out (arrays, tile maps, formulas etc.) What I do need 12 sprites (correct and incorrect answers) change position then correct answer has been pressed in 3x4 grid. But I don't know to make a grid it self, columns rows and move them, there are too many different articles about it.

Regards,

Aurimas
B
8
S
1
Posts: 25
Reputation: 402

Post » Fri Aug 29, 2014 2:47 pm

It all depends on your needs..

Would it work for you to just visually create the grid inside the editor and set the sprites accordingly?
(I guess using one sprite with animationframes for the answer would work the best)
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Aug 29, 2014 2:54 pm

ohh, I did some error in description, it is not sprites, it is text outcome from question. right now correct answer is always in a same spot, I want to shuffle around them with false ones after correct got pressed
B
8
S
1
Posts: 25
Reputation: 402

Post » Fri Aug 29, 2014 3:00 pm

How are you generating the answers (correct and wrong) ?
By randomizing the generating it should be possible..
Arrays may work, but a lot of it depends on how you have your events set up..

It would help a lot answering your question if it were possible to see the events and or capx..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Aug 29, 2014 3:02 pm

it is math, answer comes in to one of the text box, all others are incorrect outcome text boxes
B
8
S
1
Posts: 25
Reputation: 402

Post » Fri Aug 29, 2014 3:06 pm

.
Last edited by Aurimas on Fri Aug 29, 2014 3:28 pm, edited 1 time in total.
B
8
S
1
Posts: 25
Reputation: 402

Post » Fri Aug 29, 2014 3:17 pm

Ok, how I would do it:

Use one textobject and give it a boolean variable rightanswer set to false

on start of layout pick a random instance of the textobject and set the boolean to true

if the boolean is true set the text to Answer

for each textobject if the boolean is false set the answer to answer+choose(-2,-1,1,2)
You could even make an extra variable to make sure no two answers are the same
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: stevenode and 10 guests