YoHoho's Recent Forum Activity

  • ....

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • ....

  • ....

  • ....

  • Put the origin point at a tip of the triangle.

    For each hexagon x/y

    Repeat 6 times - Spawn triangle at x/y, rotate loopindex*60 degrees.

    To get a random color for each triangle, assuming you are using a single object with different animation frames, add an action to set animation frame to floor(random(6)).

    To get a non-repeating random color for each triangle, create an array size 0,1,1.

    Step 1 - Populate the array

    Repeat 6 times - Array Push Back loopindex

    Step 2 - Pick a number out of the array out of the remaining available numbers (use a variable)

    Set PickedIndexVariable to floor(random(array.width))

    Step 3 - Apply the picked number

    Set triangle animation frame to Array.At(PickedIndexVariable)

    Step 4 - Delete the picked index so it can't be picked again

    Array delete index at PickedIndexVariable

    Repeat steps 2-4 until all numbers are picked

    Repeat step 1 for next set of triangles.

    Repopulate array

    Well that first suggestion actually worked. The triangles are a little uneven but I guess I have to create a better triangle. Thanks again.

  • ....

  • I'm attempting to create my own hexagon based grid for testing. I've been able to assemble hexagons the way I want and now I'm trying to have separate sections for each hexagon. Here's a pic of what I'm trying to accomplish.

    How do I setup the hexagon so that each of the 6 equal triangles appear to fit inside the hexagon together equally? You can easily place the 6 triangles on the hexagon and they fit. I'm just not sure what events would place them all together so that every hexagon on the layout has the 6 triangles. Each triangle is a separate sprite.

    Also, is it possible to randomly have each hexagon get a random arrangement of the 6 triangles? Any help would be appreciated.

  • ....

  • ....

  • thanks anty21ro, facecrime

    YoHoho

    [quote:2z2hh4nf]Is anything spelled wrong...? Or...what?

    sorry, don't understand. What do you mean?

    What is the name of the game? How is it pronounced?

  • On your screenshot the "For each key" event is executed every tick, which is wrong.

    You need to move it to "Local storage item exist", after you've loaded the dictionary from local storage.

    Also, you should remove subevent #3.

    And if the "Name" instance variable is unique for each item, it's better to pick a_PicPreview by Name, rather then by UID.

    Finally, I've been able to get this to work. It seems to be that you can load the Dictionary once you need it instead of just at the start of your game. This was really making me nuts but now I'm seeing how it works. Thanks again.

  • Is anything spelled wrong...? Or...what?

YoHoho's avatar

YoHoho

Member since 31 Aug, 2015

None one is following YoHoho yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies