Jax's Forum Posts

  • I have performed a test to determine that I can enforce the spawn distance of enemy sprite instances :

    I have assigned the instance variable Type-A to the Enemy sprite in the layout area so all instances of this sprite should have the same variable and therefore be chosen via reduction.

    What I find happens instead is that Enemy sprites are still being spawned overlapping even though I have enforced a 1000px distance from their points of origin to the spawner sprites' location.

    This shouldn't be happening :s

    To me it seems that unless I specify individual IID's for all possible instances, it will treat Enemy.X, Enemy.Y as the X and Y positions for Enemy(0) only and ignore all other IID's even though they should be included in the reduction process based on this being a sub-event.

    I just don't understand what is wrong with my logic and approach with this. I understand that based on your most recent post, unless you use Pick All, sub events will be only targeting instances remaining after a reduction condition and will ignore all others .. so I determined that I can simply use a sub-event to ensure that all enemy instances are being targeted.

    I mean technically all of this is unnecessary since it should have ALL instances of Enemy being targeted by default regardless of needing that instance variable.. but I wanted to be sure it knew that when I used conditions targeting Enemy.X and Enemy.Y it should be for all instances of the Enemy sprite and not just Enemy(0) *the original instance IID*... the one that was not created during runtime.

    EDIT :

    Just had an idea after reading up on families, if I were to put the Enemy sprite into a Family called "All_Enemies" then I could simply use All_Enemies.X, All_Enemies.Y and it should technically apply the comparison to all enemy sprite instances.

    distance(Spawn_Zone.X, Spawn_Zone.Y, All_Enemies.X, All_Enemies.Y) > 1000

    I mean personally I don't get why it should work any differently considering it seems pointless to make a family for just 1 sprite when it is meant to be used for multiple sprites not multiple instances of a single sprite but it might make a difference o.O

  • Thank you very much again for taking the time to consider these things. It may be true that not understanding how objects are being targeted in C2 is the root cause of the issue. I do consider that most of the alternatives use a more clear approach for handling this and also agree that understanding this process is critical to success with any engine.

    With this in mind I do want to give C2 another shot even if it is just to prove to myself that I can grasp its unique approach.

    I will now begin to study these things and will post an update with an improved capx once I have implemented this knowledge.

    Thanks again for your support and feedback.

    EDIT : based on the example of the workers, since in my scenario I am wanting all the enemies to be chosen.. I don't need to filter anything.. yet when I tried this using both the Pick All command (made no difference) and the For Each (returned errors) I still feel lost as to whether this reduction process would really help.

    for identifying which enemy is closest I can imagine it might be of use.. I just need to think of a way to exclude all instances of enemy that are too far away from the player sprite. *which I thought I was already doing with the "Enemy : Pick nearest to Player.X, Player.Y" Condition*

    The only possible conclusion as to why this did not work would be that I can't seem to determine the connection between reduction on the Event side of the equation via conditions and then the applied Actions on the right hand side as technically.. it should only be applying actions to the resulting instances left after the reduction process has been applied but this just didn't happen :s

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, thanks for this information. I'm not sure what families are so i'll try to do a forum search and hopefully it brings up some handy information. At this point the project is so far behind schedule that there isn't too much point trying to further continue working with Construct 2.

    I'll likely migrate to a less simplified engine so attempts to micromanage don't become so problematic. I really do want to complete this final project though if I can.. don't like leaving things so close to finished and giving up.

    It really bugs me that Construct 2 has so much potential but each time i re-visit it, I'm left with hours of problem solving and running into walls trying to achieve things I thought would be far more simple to achieve based on previous experiences in more advanced engines.. what a waste..the hard stuff is easy and the easy stuff is convoluted or achieved in an abstract manner unfamiliar to all previous engine experiences I've had.

    Either way to show my gratitude for your help in response I will do my best to give this families thing (whatever it is) a shot and see if I can at least see this final project through to the end. I do appreciate the time you have taken to look over the topic and attached file so giving it 1 more shot is the least I can do to say thank you.

  • Can someone please help with this, I've tried a lot of things but just can't figure out the solution. This software seems confusing :s

  • double bump... Please can someone please help me with this.

  • bump

  • Yeah I am finding the way construct handles instancing and things is very different to the way other software I have worked in like Unity deal with things.

    I am actually looking at building a similar demo game in UE4 using blueprints as well just so it can have an example file for usage and reference purposes.

    I now have most of the sample game completed and am just waiting to get a few of the strange bugs being experienced looked into. Some are not bugs I'm sure but there are others which most likely are.

  • I have a fairly simple project with an clear goal in mind but am finding it oddly difficult to get a working output for some bizarre reason.

    Basically, it is meant to be a game where you walk around and beat up enemies.

    A new enemy spawns in each time you destroy 1 of them.

    The game begins playing peaceful music at the start and when the player gets near enemies.. it fades out and fades in with action music.. once enemies are all gone it fades back to peaceful music.

    **

    When the player gets too close to an enemy it will randomly start attacking the player moving towards them in short bursts giving the player a chance to run away if they want to. **this part is not yet coded in**

    Issues :

    1)

    I've tried to handle multiple instances using the "For Each Enemy" condition as the first one listed for each event where multiple instances of the Enemy Object will be referenced to, but this results in a rather long error pop-up in the Chrome Browser (the one I am using to test this in)

    The only work-around I have found so far is to limit the number of IIDs that can ever spawn at any time and then list each one off. If there were a shorter way of dealing with this, I am all open to ideas.

    2)

    Sounds are not fading in and out correctly. I have tried to use an approach where the script seeks out the closest instance of Enemy and then determines its proximity to the Player sprite. I then set it up so when the player walks into range of any Enemy instance, the peaceful music fades out and the Action_Intro starts to play with its volume initially being an inaudible dB and gradually getting louder as the player gets closer to the target.

    **needs to be coded still** Once the player gets within 400px of the nearest Enemy instance, the Enemy will attack the player randomly as well as move in short bursts towards the general direction of the player with random duration of pausing in between each charge attack. At the same time, the volume will stop getting louder and continue to playback at 0dB untill the player moves more than 400px away from the closest enemy.

    If an enemy is destroyed, an invisible sprite is moved to the location of the destroyed Enemy. I then use this sprite as a "place holder" so the sound doesn't instantly cut off or glitch from 1 sound file to another abruptly but can make a smooth transition between them.

    **need to add a bullet effect to the invisible Enemy_Ghost sprite so it steadily moves away from the player the moment it is positioned over the destroyed Enemy ... this will make the volume gently transition BUT only i no other enemies are within range of the player still**

    That's pretty much it, perhaps there is a far more simple way to achieve what I am after here but since I couldn't figure any other way out, this was the best I could come up with.

    I am secretly expecting that I've gone and made things far more complicated than they have to do and that Construct 2 is designed to automate a lot of the things I've tried to micromanage but I just am not sure how to access these things so they function as intended.

    Please find the CAPX file linked below :

    http://www5.zippyshare.com/d/82926545/508/Street%20Thrash%20Game%20Demo.capx

    p.s. there is this odd gap between loops of the audio files and the actual sound files have no silence top or tail so it shouldn't be happening.. if anyone knows why construct 2 is adding this gap of silence between each loop of the files that would be great to know.

  • Oh so there is no way to compare the distance to all instances of an object without specifying their unique iid`s. Well sorry for the mizspodt i somehow thought based on the documentation i read that pickall would make it work but pickall must only be relant to actions

  • Problem Description

    I use Pick All and then I reference all instances of 1 object to determine the distance another object is to any of them and this is not working.

    Attach a Capx

    please find he Capx linked has to be zipped as per the upload constraints of file host :

    http://snk.to/f-c7n8gfik

    Description of Capx

    player walks around with Arrow Keys.. Attacks with Spacebar.

    Enemies should be spawning in and being forced to remain 1000px from each other spawned enemies is capped.

    I have further tested this and can confirm this is an issue as I manually specify all possible IID's for instances that can spawn and suddenly they function as expected.. but pickall should have chosen all IID's and performed the same function.

    Steps to Reproduce Bug

    • Step 1 - run the capx
    • Step 2 - walk around and notice how many enemy objects are overlapping.

    Observed Result

    As per above enemies are spawning in on top of each other even though the code should be forcing them not to be able to do this with 2 different conditions.. so I don't get how it can unless there is a bug.

    Expected Result

    Enemies to never spawn overlapped

    Affected Browsers

    • Chrome: (YES/) others prolly the same I just only tested in chrome.

    Operating System and Service Pack

    Win 8.1

    Construct 2 Version ID

    r197

  • I've ran into a small issue with the sample game. For some reason it is generating far too many enemies and I've tried to identify the issue all day but just can't pick why it's happening.

    I am using a system where a global variable called Enemies starts at 0

    as enemies are spawned in, it adds 1 to that variable.

    as an enemy is destroyed, it subtracts 1 from that variable

    I have a condition in place so that if the Enemies variable is less than 11 a new enemy can be spawned in.

    For some reason even with this (what I figured) water tight setup, when 1 enemy is destroyed it creates around 80 more in quick succession :s

  • Hey there Jobel,

    That's an excellent idea. I think I will get onto producing a sample Construct game to show how the adaptive music flows between various Sound Blocks in the context of a game. There is a demonstration that shows the flow between an Intro->Genre->Outro sound block for the Action Genre in the context of video production but as you highlight, nothing similar for game environments.

  • Thanks Plowman for sharing a working link to the project. I have been working hard to organise a solid press release for it to better spread word so hopefully things can turn around for the Kickstarter before it's too late ^ ^

  • Thanks heaps for the support and tips!

    Look for teams to crowd fund with,

    More people joining forces, more the chance you will succeed. People trusts a team more.

    Also you need a lot of marketing muscle to pull it off. Not going to be easy.

    I have recently been approached by another Sound Engineer so I am going to be entering into a live chat with them over the next few days to discuss the possibility of expanding Adaptive Music to also include Adaptive SFX packages as well.

    I completely agree with using adaptive music for games--the rest of the game interacts, why in the world shouldn't the music? If kickstarter doesn't work for you, you may find luck with finishing one complete group and releasing that on asset stores and using any success with that one to fund subsequent ones. And, in case you were wondering, Construct 2 makes adaptive music very easy to implement (I've made several instances of it).

    I originally wanted to complete an entire Themed Pack for the project but the costs to upgrade my equipment and then secure the non-trial copies of the audio software make it somewhat out of my reach which is why I started the Kickstarter project off to try and raise enough funds so that I can produce the music to an expected high quality standard.

    I really like the way Construct 2 handles events and have found that this approach to scripting is now becoming more common even in the big engines like UDK and Unity 3D but of cause Construct has been at it since the beginning and have it down to a fine art already whilst the new-comers are still finding their feet ^ ^

  • Hey there yes they are the music packs being created. The content is intended to be easy enough to assemble that additional audio editing software should not be necessary for deployment.

    It is my project and I suppose I'm still finding my feet with the correct way to let others know that it exists.

    Some of the information I have been told states that I shouldn't mention it's me who is the creator as this seems more like a professional press release and then other sources advise the complete opposite to this. It's surprisingly confusing trying to just get a dream I have turned into a reality O.o

    I really want the ability to create an abundant resource of music that can be easily picked up by content developers and assembled with minimal effort as I believe this dynamic approach can lead to the possibility of increased end user immersion during gameplay if the background music is adapting to the very actions of the player in the game.