YoHoho's Forum Posts

  • I've still have yet to accomplish this in a way that doesn't involve complicated events. I know there's a way to do this since I've seen several games on this site do this.

    The best example would be a select character screen from a fighting game. That probably would involve the most things to select from. Then I could work my way on to something with less/more choices after looking through a .capx. Any help would be appreciated.

  • This is definitely one of those 'Way too complex .capx files made by one of the geniuses at the Construct forums', but I think I can find something to do with it. Thanks for working on this.

  • ...and as another behaviorless example there is this:

    https://www.dropbox.com/s/aondowy4ycjgl ... .capx?dl=1

    Click drag to mark start and end points.

    I took dop2000's map, added in the event based astar shortest path search i've made previously, added some setup events to generate nodes at the corners of the walls, and then finally did an event based los to create a connection graph.

    It works pretty well, I thought it would be slow. There are a few things that could be done to improve it.

    * The corners can be moved closer in. Too close may cause issues with the los and generation though.

    * Only unrotated boxes work for walls with this. Rotated boxes or arbitrary polygon shapes can be done. The generation and cleanup of the nodes in setup would need to be modified.

    * The mesh is kind of ugly, so another idea is to build in an editor in the game to be able to give more manual control if need be. Tweaking the whole thing to be more navmesh like would be nice.

    Anyways, that was fun.

    cheers

    I hope you keep working at this. What exactly can be done with this in regards to having sprites move along the path one draws out?

  • ....

  • ....

  • ....

  • ....

  • 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.

  • ....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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?