BluePhaze's Forum Posts

  • Hello All,

    I am working on an idea and wanted to get some input, I want to have a grid of objects (Think blocks or bricks) and I want to have AI controlled sprites automatically attack certain blocks. Now The twist here is that when they are attacking one block they should not hit the others, the shots should pass right through. So here is my rough idea, and I am open to anyone else's thoughts on the best way to approach it:

    1. Create a grid of blocks made of instances of a sprite.

    2. Use an array to track each blocks location and current state.

    3. Have enemy sprites that randomly come and shoot/attack a particular block.

    4. While that block is being attacked, the surrounding blocks should not block the shots targeting the target block.

    5. After 4-5 hits, the block being hit is destroyed

    6. At this point a new block is picked and the enemies start attacking it instead.

    7. Once a block is destroyed its destroyed state is stored in the array so that it does not get picked again to be attacked.

    8. Each block will have multiple states (Whole, multiple levels of damaged, and destroyed). These will be tracked in the Array by assigning a number to each state. For example 6 = whole, 5 = slightly damaged, 1 = destroyed.

    9. I may also track how many blocks are left so that I can have an event trigger when all blocks are destroyed.

    Something like a block breaker/breakout game except that only a specific brick can be hit at any one time and all other bricks are basically visible but not solid until they are picked as the target...

    Anybody have any thoughts on a good way of implementing the logic for this scenario? I haven't had to use arrays much in construct yet, but am familiar with them outside of construct from my developer days. Any thoughts on the best way to do this would be great.

    Thanks,

    James

  • rocky10529 WOW Great game, I made it to level 37 and had to stop at 200 deaths as I was getting killed trying to make that tight turn so farm from the magnet. AWESOME game!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • PhoneGap has many issues, CocoonJS has had much more success. Scirra does not make phonegap, they just allow Construct to export to it. They can't fix issues with Phonegap. CocoonJS seems to be the better choice lately.

  • Phonegap still isn't a viable solution. Scirra can't do anything about that, hence the inclusion of CocoonJS and Appmobi. Others have successfully used cocoonJS. I see no problem with that.

  • I believe you need to look into IID and UID to specify specific instances of the tower... Sorry not in front of construct right now so can't provide a better example. Check the manual on using UID and IID. Unique ID and Instance ID.

  • GeometriX YOu may need to fix the URL in your signature, this is what I get when I click, on it:

    http://www.scirra.com/FORUM/%22http://www.scirra.com/tutorials/443/building-a-tower-defence-game-with-the-turret-behaviour%22

    It looks like it is sticking %22 before and after your link which I believe are either brackets or spaces. Make sure there are no extra characters or trailing/leading spaces in your URL. I had the same issue with mine. The Insert link buttons on the site tend to insert a space between brackets, etc..

  • You may want to use one of the directional behaviors instead of car. Car is for turning and rotating based on direction.

  • Wow, great way to reply to a 2 year old statement. I would look at the tutorials and manual before reading a reply to a question that was asked when phonegap was still in early stages. And they didn't create phonegap. They allow you to export for phonegap, but have no control over what phonegap does or how it does it since it is not their product.

    Also note this reply which you seem to have overlooked completely:

    WildShroom - this thread is over a year old and its information is mostly irrelevant. Pretty much everything has changed since it was posted. You'll definitely want to use the CocoonJS or directCanvas exporters instead of PhoneGap.

  • jayderyu The animation that starts for you in spriter is the first animation right? For example if you SCML has multiple, is it starting the first animation (from the animation list in spriter)? If so a fix would be to make the first animation simply the idle animation or a single keyframe animation so it doesn't move. Just a thought in the meantime...

  • You could also assign an instance variable and set the frame based on that, I know it is sort of the reverse of what you are asking, but has the same end result, the frame is now tied to a value.

  • DillonMakesGames that's the one! Sorry didn't have Construct in front of me at the time. Glad to have been of help!

  • Kiira Nevermind on the background tiles template examples. I know you are pretty busy and I have spent some quality time with InkScape this past week working on my own.

  • danielshunter what's with all the shady tags on the youtube video description... faking folks into watching it with fake tags isn't going to get you a lot of fans on youtube... just sayin...

  • I am not annoyed, it just keeps making me think of the movie I took my kids to last week, the Croods.. :) Funny stuff... Ok, maybe I am the grammar/spelling police... I try not to let it show...

  • You also have the run once option.

    You could also create a variable to track if all blocks are broken. Set it to 1 when all blocks are broken. Have a trigger that checks if the variable is 1, if so adds 10 to the score, then sets the variable back to 0. That may work for you.

    The current issue is you are basically saying when all blocks are broken add 10 points, well every time the code runs through (each frame) it is still true. So you need a way of setting a condition that they are broken and then clearing it so the code doesn't keep running.