vee41's Recent Forum Activity

  • Could not really understand the question, I suggest that if you are starting out reading this is a good way to get going! :)

  • How about something like:

    if NOT player.overlapping.path

    stop movement

    snap player to path

    if player.overlapping.path

    enable movement

    You get the general idea :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You use a global variable for all the buttons, you'd need every button have their individual timer variable.

    I did a little variation of your capx here: dl.dropbox.com/u/19921470/cooldown.capx

    Note that this is not the best way to do things, I hope it helps you understand certain things you had overlooked like picking :)

  • Here you go: Framerate independent games

  • Good luck, I added few features to this that could be basis for saving and loading: dl.dropbox.com/u/19921470/Main%20(1).capx

    Right now you are 'loading' and 'saving' map simple by pressing a button, if you wish to actually save data to a disk I recommend you take a look at the webstorage plugin. What you'd need to do is set the initial array values at the start of the layout, this way your map would load when the game starts. :)

  • The line which you removed - "SetAnimationFrame to Shop.At((Tile.IID)%LevelWidth,(Tile.IID)/LevelWidth)" was designed to refresh the tile sprite frame to reflect that of the array, meaning that if the array x.10,y.20 = 1, it would set the corresponding tile to play frame 1. This means that the array can be saved as a string, and then loaded on startup.

    Does this make sense?

    Ahh, gotcha. Thought it was meant to do something like that but couldn't really figure it out. :)

    At the moment way I restructured it, painted values are saved into array. So if you paint few tiles as animation frame 2 value '2' is saved to corresponding location at the array. As of now, there isn't anyway to change frame you are painting, but this would be a simple variable you can change via button or something.

    What this array makes possible is that you can save/load levels. Right now there is no level generation from array, which should not be too hard to implement. Saving arrays as strings and loading them at startup is a good idea, there are some good examples of that around here :)

    Saving and loading could be implemented with arrays 'load' and 'asJson' functions, think I removed one of them as it wasn't really doing anything :) What you'd need is a save/load buttons which trigger these functions, and multiple arrays to save/load levels to/from.

    This is not really the simplest stuff, but once you get some basic principles down it should clear up nicely! :)

  • Do you know how you made those local variables? I can add more to your event editor, but cannot add a new one from scratch.

    Local variables are made inside events, if you create variable inside an event that is triggered it automagically becomes local variable.

  • I made a couple of changes, tried to comment them into the events. Take a look :)

    dl.dropbox.com/u/19921470/Main.capx

    For printing the arrays (which is good idea to figure out what is going on) I'd recommend using some custom plugins like these:

    scirra.com/forum/log-text-objects-to-chrome-console_topic47859.html

    scirra.com/forum/plugin-debug-panel_topic48052.html

    I use the chrome plugin myself, works great!

  • Move action 'set size to (levelheight, width)' below the actions where you set values to levelheight and width. Right now the array size is not setting up properly as you set those values AFTER you set the height/width variables. :)

  • Would you be looking for something like:

    for each p

           push_back p.uid on x-axis

  • Navigating the array would be done via array actions like Array.At(X, Y) or similar, it's all covered in the tutorials linked previously.

    Don't really understand what you mean by 'see it in realtime'? For debugging or what? You could make text where you print array contents each tick.

    each tick

         for each value array (x,y)

               append array.CurValue to text

               if array.CurY = array.width-1

                   append newline to text

    if you wish to do something roguelikish and generate maps using array.. I'll post a little example soon.

    EDIT: Here you go dl.dropbox.com/u/19921470/roguelikish_map_generation_via_array.capx

    Simple eaxmple, a playable roguelike would of course need much more sophisticated randomization. And thou shall not mock my artistic skills :)

vee41's avatar

vee41

Member since 12 Apr, 2012

None one is following vee41 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies