deadeye's Forum Posts

  • The way you're doing it is fine, don't worry about performance unless you have tiles that are non-power-of-2, or are very large, or if you have a few hundred different kinds of tiles.

    Yes, I agree that a Tileset plugin would be cool. David was working on one a while back, but it was never finished and it was a little buggy, and the interface was never completed. Hopefully someone will come up with a tileset solution because there is a need for it, and people ask about it periodically.

  • First two don't work for me (Unexpected error)

    XP SP2

    AMD Dual Core 2.21GHz

    2GB Ram

    Nvidia GeForce 9500GT

    But the third one works... and WTF?!? How did you do that? It's awesome...

  • [quote:1cvianxb]Deadeye you are overly dramatic

    Oh, what gave you that idea?

    (BTW, your right-click trick doesn't work for Mediafire, it saves as a .cap but the contents of the .cap file are actually HTML for the Mediafire download page )

  • You deleted your link? Why?

    Or maybe one of us could repost it on dropbox, etc.?

    Hmm, I wonder which "one of us" should repost Lost my Keys' file in Lost my Keys' thread...

    Edit:

    Well, it seems that Lost my Keys may have gotten upset over this thread (even though there's really nothing more offensive than "I don't see the point of this thread" in there) and decided to edit out his other threads as well.

    Okay then, since I still have the file I'll re-up it and put it back in the OP. Hopefully Lost my Keys will come back around, I don't think anyone was intentionally meaning to offend him and he seemed like a nice enough guy.

    Edit 2:

    The file is back up in the OP or you can get it here:

    http://www.box.net/shared/svu919182h

  • I tried the first one and I noticed that in the duration that the hour is 12, PM and AM keeps exchanging each other. I think that while the global variable hour is 12, my event with the else condition is looped until hour becomes 1.

    Of course, you would also need a condition to only trigger the switch once for every time the clock ticks over to 12, otherwise all during the hour of 12 you will have the AM/PM swapping every other tick.

  • Still, it would be nice if the Copy as Text formatting was cleaned up a bit:

    buttonHover: 26 buttonHover:  Value 'click' Equal to 0
    

    buttonHoverTextSet text to "Unselected"[/code:17dichlu]

    It's got repeat stuff, numbers that make no sense (I think they might be the UIDs), missing spaces, etc. Not exactly a high priority though, I would guess.

  • Order of events.

    + Foo = 1
        -> Change Foo to 2
    
    + Foo = 2
        -> Change Foo to 1
    [/code:2vm729ga]
    
    At first glance you would think that this would toggle Foo back and forth between 1 and 2... but it doesn't.  Foo will always be 1.
    
    The reason is that the first event changes Foo to 2, then you immediately go into the second event... which says if Foo is 2, change it to 1.
    
    What you need is something like this:
    
    [code:2vm729ga]
    + Foo = 1
    |   -> Change Foo to 2
    |
    + Else
        -> Change Foo to 1
    [/code:2vm729ga]
    
    "Else" is a special condition that links to the previous event.  It sort of turns the two events into one, which takes care of the order of events problem.
    
    Alternately, you could make a switch, like so:
    
    [code:2vm729ga]
    + Always
        -> Set global('switchAMPM') to "yes"
    
    + Global('hour') = 12
    + Text.Text = "AM"
        -> Set Text.Text to "PM"
        -> Set global('switchAMPM') to "no"
    
    + Global('hour') = 12
    + Text.Text = "PM"
    + Global('switchAMPM') = "yes"
        -> Set Text.Text to "AM"
    [/code:2vm729ga]
    
    Of course, you would also need a condition to only trigger the switch once for every time the clock ticks over to 12, otherwise all during the hour of 12 you will have the AM/PM swapping every other tick.
  • and the resizing stopped the trippy background problems.

    Thanks for all the help.

    No prob

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Box has ****** 25meg upload max on free so thanks but no thanks!

    Which is fine if all you are doing is just uploading a cap for Help/Tech or a demo in Creations or something. For larger files you can use Dropbox.

    I use both. For more permanent stuff, like my Platform School tutorials, I tend to use box.net. For more temporary stuff that I might delete later on, or for large files, I use Dropbox.

    Seriously... I really can't stand Mediafire. I am officially boycotting it as of now. I personally will no longer download anything that people upload to Mediafire, so make of that what you will.

  • I won't bother going into great detail, because you're right... what you're asking for is pretty complex in terms of making an example cap. But I will give you this to start off with:

    http://www.box.net/shared/miyyvk0t0t

    You can draw boxes on a grid with the mouse.

    As for making lines of boxes in a series like you mentioned, you could create a system where the first mouse click places a "tower" sprite and gives it the number 1 in a PV called something like "myNumber", and sets a global called "currentTower" to the same number. Now you need to place a second tower, but it would make sense to only place it in a straight line away from the first, so you would have to come up with a formula to make sure that placement is disabled if the next tower is placed at an odd angle away from the first:

    + Always
        -> Enable next tower placement
    
    + TowerSprite.Value('myNumber') = global('currentTower')
        + (TowerSprite.X - cursorSprite.X) Not equal to 0
        + (TowerSprite.Y - cursorSprite.Y) Not equal to 0
            -> Disable next tower placement
    [/code:aqc87k3j]
    
    So, if the X position [i][b]or[/b][/i] the Y position of the cursor is different to the current tower, then it's okay to place the next tower because we know that at least one of the axes to the cursor is in a straight line away from the tower (i.e. is equal to 0).  So you allow a click, and place the next tower, and lable it's myNumber to global(currentTower)+1, and add 1 to global('currentTower').
    
    To draw between the two towers you need to find out how far away one is from the other so you can find out how many wall sprites need to be put into the space between them, then you need to loop through all the spaces and place walls.
    
    The easiest way would be to start at tower 1 and find out if tower 2 is up, down, left, or right from it.  Then you make a loop that advances the cursor 32 pixels in that direction.  If the cursor doesn't overlap the next tower, it places a wall.  If it does overlap the next tower, it stops the loop and begins the process again with tower 2 & 3, up to whatever number global('currentTower') is at.
    
    Anyway, that's how I would attempt it.  Hope that makes sense.
  • No, really. Ugh, it's a terrible site. I mean, just take a look at this:

    http://i49.tinypic.com/dfbp50.jpg

    And on top of that, I got a popup ad as well. Bleah. Now let's compare that to this:

    http://i49.tinypic.com/2u8ku8w.jpg

    Ahhhhh.... it's like a spring breeze lifting your soul. It's like puppies and kitties playing together in a meadow full of pillows and gumdrops. No ads, no popups, no garish, ghastly crap to look at... and it's a hell of a lot faster than Mediafire. Go there now! Sign up for an account! Make people happy to download your GS clones and Megaman/Sonic crossover RPGs.

    Here's the link: http://www.box.net/

  • Okay fine, that was clever. You get to live...

  • What size are your background tiles? If they're not power-of-two square then that's likely the problem for the blurriness and misalignment. It's likely your video card.

    Most video cards are optimized to handle textures that are power-of-two squared, and any other size causes these irregularities. This means that for a seamless, repeating texture you will need to use Tiled Backgrounds that are 8x8, 16x16, 32x32, 64x64, 128x128, etc. So if your background tiles are the same 25x25 as your player sprite, then you will run into problems.

    This isn't a Construct issue, it's a hardware issue. Due to how bits work in computational terms, it's industry standard to conform to these because computers can crunch those numbers more efficiently. Some graphics cards though are designed to handle non-standard texture sizes like 25x25, but apparently that's not the case with yours.

    If you redesign your tiles and sprites to conform to power-of-two sizes then you will probably see the results you are looking for. Yeah, it might be odd doing math for them at first because you can't do it in your head as easily as with factors of 5, but you'll get used to it eventually.

    As for the grid shown in the layout editor, you can change the grid size to whatever you want

    Apart from that, I can't quite tell from your post if your player sprite is moving how you intended... something about only appearing to move at the edge of the screen? I don't quite understand what you mean. Perhaps you could post a .cap showing what's going wrong, and explain in greater detail what the effect is that you're looking for.

  • OKAY HERE COMES THE BACON FAIRY TO CLOSE THE THREAD

    <img src="http://i50.tinypic.com/2gspkr9.jpg">

    Please don't advertise your website on our forum without at least introducing yourself and making an attempt to be a part of the community. Thanks

  • You don't need to use "Pick by comparison" in this case because there is a built-in expression for private variables. Just do like this:

    + Family.Ships: Value 'status' Equal to "Engaged"
        -> Do stuff
    [/code:3ns3kf75]
    
    You get that just by selecting the Ships family in the New Condition window and picking "Compare a private variable."  It's even hilighted in yellow.
    
    And no, there is no need for a loop.  The action will be performed on every member of the Ship family that meets the criteria in the condition.