RandomOutput's Forum Posts

  • BouncyTrip ,@volkiller730

    Thank you both for your replys. Unfortunately I already have the enemy count stored in a variable but when two of the enemy instance are destroyed at the same time it only counts one as being destroyed. Both of their sprites are destroyed but the .count only takes 1 away. And again annoyingly my game requires the player to destroy all the enemy's to progress, this leaves the problem of both sprites being destroyed but the game thinking there is still a single enemy left. If that makes sense ha!

    Joel

  • So this problem I thought I solved but apparently not.

    I have a global variable which tracks how many Bad guys are on screen. Now these are in a family with a local variable of health that is set to 1. The player can hit them and take health off, when it takes the health to 0 it destroys the enemy and lowers the enemy count Variable by 1. The problem is, if the player hits 2 enemies at EXACTLY the same time, it treats it as if only 1 has been destroyed, does anyone know the cause of this?

    Thanks so much

    Joel

  • So not everyone agrees that these will be helpful but on big game projects its the little things that slow you down, included in this list are a few small everyday tasks that need to be made on games that end up taking a full morning when they should only take an hour. Construct 2 is a fantastic product and with these few tweaks could speed indie gamers up alot IMO. There may already be solutions to these problems that I am not aware of, and would be grateful if I could be corrected.

    Global Grid Snapping: I am currently working on an total update on a 50 lvl game, at this moment in time, when I duplicate my level I have to go back to the view tab, click both snap and show check boxes and then reset my grid size to the desired number, for EVERY layout.

    Multi Drag and Drop: At this moment in time if I want to reorder my Layouts, objects or even event sheets I have to do this one at a time. Again when your layouts number into the double digits just simply splitting them into easier to manage sub folders turns into a drag and drop bore as you have to do it one at a time.

    Multi Event Sheet Inclusion: At this moment in time my workflow is to work with multiple easy to mange event sheets that I pipe into a master sheet. This allows me to work on features in isolation nice and easy and them implement them when I'm ready to prototype them together. To do this however I can only include 1 event sheet into a master ES at a time.

    I have a few more that I came across, but I am away from my list at the moment will add them later.

  • Hi,

    I see, so you would need a button to select ( in this case I have just used 2 sprites ) and you can use these to set a single time Var to either 5min or 10 min as I do here. This will change and reset each time they choose it. If you only want the timer to start once the level starts you can easy put a delay on the code after they press the button. The only downside is that this timer will just read the numbers it will not put the timer with 0's in it ( for example 01:03 ) it will instead read 1:3. Is this a problem? if so I will look into making read like a 24 hour clock.

    Hope this helps a little more let us know if not

    Regards

    Joel

  • Hi,

    Here is a very simple timer. Essentially it splits out the mins and secs which makes coding it much much simpler, when the seconds run out it knocks of a min and starts again. Hope this is what you meant.

    See attached image.

  • But if I run it on create, it doesn't seem to 'catch' until the next tick?

    Ahh I see what you mean now , I forget the Y value could be done by acending, which negates any problems with them being on top of each other. I stand corrected. Yes I suppose then all that would need to be addressed would be the memory issue, maybe spawning them all at once or get it to run 1 loop store it in an array then use the array info to spawn the sprites. Hmm will look into that and let you guys know the results. Thanks so much for helping work through this, appreciate it.

  • I think you're missing something a little obvious- if I put Character 3 on top, then 2 on top, then 1 on top, what order are the characters in?

    I know that but if you have characters randomly spawning in then it does not work, for example if a character in front spawns then a character in the background spawns but I need the one in the background to be behind one but in front of one it is not so easy. Its easy to solve if your characters are a set amount and all spawn in order but if I want to make a random small crowd the method you suggest will not work

  • For a single object of instances you can check each using a loop, and comparing its y to the loopindex.

    If they meet the criteria, send that one to the front.

    Or you can just do a "for each object" (ordered) by y ascending, send to front.

    Yes I thought that might work, but sending to the front would only work for 2 objects or if the objects were spawned in a sequence, what if you had lets say 3 characters and wanted them to sit in order? As far as I have seen there is no way to specify that Character 2 who's Y position is between 1 and 3 be placed in between them in terms of Z Order ( So in front of character 3 but behind character 1 ). Or would your solution account for that? Maybe I'm just missing something obvious? :S

  • Rather than just lazily ask for an answer , I'm currently experimenting with creating pseudo depth to a scene and was wondering if anyone else wants to know the same and explore a solution with me.

    Here are the Goals:

    To spawn character sprites in the game and then based on their hight in the view ( or screen ) The smaller or larger the scale, but also they need to be placed behind (Z Order?) the lower and so larger characters, this will create the illusion that the smaller characters in the view are behind and further away than the larger characters in the scene.

    The Solution: Some how I'm thinking maybe track the characters Y position and preform some maths on the characters overall size based off that, so the higher in the frame the smaller it gets, and then some how preform a test that checks each characters y position on spawn and sets its Z Order accordingly. Not sure if you can number the Z Order though so may need to look for a different solution to that problem.

    This seem like a good way to go?

    Regards

    Joel

  • You can Pretty much use the same approach as the tower defence example, these towers track the enemy ( Using turret behaviour ) and then spawn a projectile object like Kan stated, that can track and even pre-empt the players next location (depending how difficult you want it to be). If you go to new project scroll down the list and look for the tower defence example and de-construct the code they use. After you get that working its a simple task of making that sprite move in the air, there are a number of tutorials for moving enemies right here at the top of the page under the tutorials heading. Hope this helps.

    Regards

    Joel

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • >

    > > You can pick by nth instance (a System expression), a.k.a IID, and use random( sprite.count) to pick.

    > >

    >

    > Thank you I will give this a shot, I always assumed Sprite.Count would just use the maximum amount of that sprite I.e the number of that sprite it counts as created. Will let you know how it works out, thank you very much for your reply.

    >

    It is the number of currently created instances of an object, so if you had more than 6 instances (some off-screen), but only wanted to pick from the ones on-screen, then you would first pick by the 'onscreen' expression, then by perhaps by an expression where 'Sprite.IID = random(Sprite.PickedCount)'.

    It worked a treat, thank you so much! I knew it would be something simple, glad you stopped me from my over complicated approach.

    Regards

    Joel

  • You can pick by nth instance (a System expression), a.k.a IID, and use random( sprite.count) to pick.

    Thank you I will give this a shot, I always assumed Sprite.Count would just use the maximum amount of that sprite I.e the number of that sprite it counts as created. Will let you know how it works out, thank you very much for your reply.

  • Hi,

    I was just wondering if there was a way of picking on a specific instance of an object. Say for example you had 6 bad guys on screen and you wanted to make one randomly glow to signal when the player can destroy him, all 6 are just copies of the same sprite so is there anyway to isolate the individual instance(s)? There is prob an easy solution staring me in the face sorry lol!

    Regards

    Joel

  • Personally, I don't think it's that important. This is just my two cents though and we both have different work flows. It's like comparing apples to oranges really. I don't think it'll save that much time.

    Color coding folders though, that is something I agree with. I don't know how much I would use it. I tend to focus on location of an object quicker than color or shape. Still, this could be a nice organizational improvement.

    Yes I suppose it is workflow based. For me on small projects no, it does not save me much time, but on bigger ones if you have to click and drag 50 objects into a folder then it slows me down. Take for example families in construct 2, lets say you make your game with 50 objects in the enemy's family. Then in 3 months time you make a update with a new game mode that has the same enemies but you want to modify them and make their behaviour harder. So you make a new family, not only do you have to duplicate the objects one at a time but THEN you have to add them to your new family one at a time. I suppose you could do it with coding, but if your going to do that why make the families an option in the first place? Like you say I suppose its all down to workflow but its standard windows functionality so its something I have just got use to, and something that does slow me down in certain projects. Thanks for the reply

  • Hi,

    First of all, construct 2 is a marvellous and well developed bit of software that is constantly updated and a joy to use. However I have a suggestion for day to day work as opposed to new features and one that I personally feel will speed up game dev.

    This comes in the form of project management. For example, a simple task, as far as I can tell as I am not claiming to know all about C2, such as moving a set of objects into a subfolder, has to be done one at a time. If I am wrong on this I would love to know!

    Same goes for including event sheets into a master sheet these have to be done one at a time.

    It would also be good if these sub folders in the project pane could be colour coded for quick visual reference perhaps? Little things like these could help save hours per week when it comes to organizing your projects. Yes these things should be done from the start but sometimes you forget when your in the heat of getting it done.

    Also as a game project goes on games change and so the order and placement of things may need to be radically different. On small projects its not such a big deal but if your dealing with lots of objects and event sheets and layouts.... well you get the picture

    Just some thoughts.

    Regards

    Joel