AnD4D's Recent Forum Activity

  • Brilliant Tobye!

    That's worked fine. I've updated the capx in the first post in case anyone else wants to see it.

  • Hi guys,

    I'm trying to figure out how to have a character have 4 directions in his animations (Up, Down, Left and Right). I've given him the bullet movement, and wish for the animation to be selected based on the direction he is moving in.

    I am testing this with 3 versions of the same sprite.

    I have tried a For Each command, followed by a 'if bullet angle is between 45 & 135 set animation to 'Down', and it appears to work, but If I add in the other directions, the characters just pretty much settle on looking down all the time. Quite frustrating.

    I came from Multi Media Fusion, where the system would pick the animation angle based on the sprites movement, and am surprised something like that still doesn't exist for C2 (which is sooooo much easier to use in a lot of other ways, I should add).

    In any case, I'd apprecaite any help.

    please see the capx here <img src="smileys/smiley5.gif" border="0" align="middle">

  • Oh, you did it. I was way off!!! <img src="smileys/smiley36.gif" border="0" align="middle" />

    Alright, I'll have a decent read of that, and figure out what I can do to swap, save, and load :)

    Thanks again!

  • I have removed the command "Tile set animation frame to 1" and have tried to re-introduce the code that will set the frame based on the underlying array number, but I'm not having much luck. Either the system appears to be painting the surrounding tiles, painting an ever changing pattern (somehow) or painting the entire board the same colour.

    I like what you've done with the Mouse.x and y positions coordinating with the array, but I'm not sure how I can re-use that data elsewhere.

    I am simply saving over the link in the first post. I feel I'm 1 line away from making this work as expected.

  • Great! I've read up on a few examples, but I can not figure out how to save and load. At the moment I'm just playing with keyboard commands to trigger these, and I'll have the mouse wheel choose the frame number, just to start things off...

    I'll give it a go. Hopefully it'll just click into my mind on what I'm doing :)

    Thanks a lot for your help!

  • Thanks vee41, very impressive. Still trying to get my head around the changes, but from what I'm gathering, there doesn't appear to be a method of saving or loading.

    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?

  • Interesting... how did you do that? You have 3 local number variables, but they do not appear to be tied to anything. Can you perhaps try generating Global Variables instead, and using them in the expression? Just right click in the event editor and click on add global variable.

    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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, I've changed that... but when I click on tiles to change their colour (for now to just a red square) it's jumping all over the place and changing different squares. This leads me to believe the array isn't correctly linking to the tiles.

  • Hi guys,

    1) I'm trying to set up a level editor which will allow me to build a level using an array and my mouse. It'll start off with a black screen, and provide me with tiles to select on the right hand side of the screen. I will then pick a tile and start painting my level.

    Once this is done, I then want to be able to save the level I have made into an array, save it, and call it later.

    Please see my CAPX so far. CLICK HERE

    This is based on

    Subscribe to Construct videos now

    , and I have looked through the FAQs and searched quite a few times. My brain is telling me that the basic editor that I have set up is correct, but for some reason it isn't working (my brain or the software <img src="smileys/smiley36.gif" border="0" align="middle">).

    2) In any case, I wish to be able to expand on this at a later point, and eventually have a level randomly generate itself, but in a clever way with transitions, for example, water will not just be a square - the system will recognise water tiles, and surround it with edges, or gem blocks and bleed off into the surrounding dirt. This data will then be stored indefinitely until it's needed.

    3) Finally, the idea is to be able to use the path finder to have units navigate the terrain even as it's being changed.

    I wish to have a better understanding of arrays, and see how the system knows which tile correlates to which point in the array.

  • Hmm, this would interest me too... let's have a think...

  • I love C2! Such a breeze to make games in. It's just once finished, I can't get them where they're going to be played - EXE, Android, iPhone, XNA. I'm currently planning a new game as I'm tying up a game I've been working on for the last year or so... but I think I may have to try a different engine.

    Big shame, as it's harder to develop for, but in the long run I think it'll be the best choice. Hopefully by then there will be native exports, rather than additional expenses.

  • In that case, I'll give it a go!

AnD4D's avatar

AnD4D

Member since 4 Nov, 2011

Twitter
AnD4D has 3 followers

Connect with AnD4D

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies