SullyTheStrange's Forum Posts

  • There's a way to fake constructors and destructors, which won't look as nice but works just as well. If you spawn an object with the variable "Created", initially zero, just test for "Object - Created = 0", and do whatever you want to do for the constructor, and at the end of it set Created to 1. As long as you never touch that variable again, those events will only trigger once when it's created.

    As for destructors, you could take the same variable and set it to 2 when you want to destroy it. Test for "Object - Created = 2", and do whatever you need for the destructor, and then destroy it at the end.

    Whether or not a certain feature is explicitly included, there's almost always a way to get the same functionality. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • gndwestwd, take a look at the example file "Lighting.capx" that comes with Construct 2. You can use that effect to get the result you want. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • I'm sensing some Google Translate usage here... I can't really tell what you're asking in either question. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Haha, not quite. <img src="smileys/smiley2.gif" border="0" align="middle" />

    What we were doing before is changing the whole angle, when you also have the option of only changing the angle of motion, which won't affect the sprite's orientation.

    dl.dropbox.com/u/19702035/EnemyMovement5.capx

    Here's the way to do it if you don't want the actual sprite to rotate at all. But if you're using a top-down perspective, I guess the original way is better!

  • I've never been a fan of switching layouts for stuff like that. All the menus I use in my game are invisible layers that switch in and out as needed. If you wanted to switch layouts, and then switch BACK and have everything the same as it was before, you'd have to waste so much time saving all the data and resetting positions and variables... it just isn't worth the trouble. Using layers is much easier.

  • 100MB too big? Are you serious? What if one (like me) does not care for mobile? Is 100MB still too big?

    It depends on the game. If it's a casual game that you want people to see it and think, "Oh, that looks fun", and then they click and start playing, 100MB is way out of the question. People want to jump in and play, they don't want to sit there for two minutes or so while it loads.

    If you're making a larger game for a less casual audience, it could still work out, but even then people might lose their patience and leave if it takes too long and they weren't too interested to begin with.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No problem! By the way, do you want the enemies to spin on their heads the way they currently do? There's a simple way around that if you'd rather they stay rightside-up. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • What I did was actually... much less involving than that! <img src="smileys/smiley36.gif" border="0" align="middle" /> Rather than rotate them the way you're trying to, in my game I just made them snap instantly to the new angle. It wasn't pretty, but with such a short deadline, "pretty" wasn't my focus.

    Anyway! I found a pretty simple solution for you. Rather than use individual pointers to guide the enemy along the turn, we can use the "rotate __ degrees" actions to take care of all that for us. It took a wee bit of tweaking to get the pointers at the proper places, but it seems to be working just fine!

    db.tt/G1cwwylb

  • I recently had to make a tower defense game in a two-week period for a class of mine, and that's the exact method I used. It worked fine for me... If you post your capx file, I can take a look at it and see if we did something differently. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • *cough* ... So scroll wheel detection isn't in the cards? <img src="smileys/smiley18.gif" border="0" align="middle" />

  • AH. I see what's happening there. It's taking & to mean the logical AND rather than the concatenation I was expecting. Adding &""& in the middle seems to fix that problem.

    Uhh... yeah. That solves that. <img src="smileys/smiley9.gif" border="0" align="middle" />

  • EDIT: Never mind! See second post for my dummy solution. <img src="smileys/smiley17.gif" border="0" align="middle" />

    Specifically, with concatenating values from arrays. Look at this small capx: there's two events, one initializing three values in an array and one displaying values in a text object. It isn't behaving quite the way it should, unless I'm just not seeing what's happening here...

    Array (0,0) is 5

    Array (1,0) is 2

    Array (2,0) is 3

    I tried displaying "Array.At(0,0)&Array.At(1,0)", thinking I'd get "5" and "2" concatenated together, but instead I get... drumroll please... 1. <img src="smileys/smiley5.gif" border="0" align="middle" /> It just says "1". Why is that?

    dl.dropbox.com/u/19702035/arrayconcat.capx

    Oddly enough, that's not even what I was trying to test with this small capx. I was going to try to display "Array.At(0,0)&Array.At(Array.At(1,0),0)", with the expected result of "53", but I didn't even get that far. (In my larger project, trying to do something like that makes the game not load in previews. In this capx, it comes out to... "1". <img src="smileys/smiley18.gif" border="0" align="middle" />)

  • Sorry to hijack the topic, but is there any way to detect middle mouse scrolling? I wanted to do something similar once, except control scrolling through events. I abandoned it once I found the mouse object couldn't detect that, since it's what most people use for scrolling. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Summarizing the topic: the ability to do this kind of lighting may come eventually, but don't make any plans around it.

  • Project Properties > First Layout > Title. <img src="smileys/smiley2.gif" border="0" align="middle" />