Stormsong's Recent Forum Activity

  • Solved.. I've been working so much this week I hadn't realised there was a better way.

    Called a state change function when needed now instead.

  • Okay, so I've been using Construct for years now and I feel so stupid for not knowing this.. I'm sure I've sorted it in the past but I'm struggling with it right now.

    I have many enemies and I want a little icon to pop up over their heads when they're alerted (think Metal Gear).

    I want this to happen once per enemy but when it happens. I want them to start other actions too on a state change but I just want to start with this one simple action to see it's working.

    So when one enemy changes state an icon pops up.. except it works for the first enemy, then all others it continues to spawn - I've tried every combination of actions I could think of so I would love some advice on how to do this properly!

    I suppose this is what I'm aiming for:

    enemy variable state = "idle"

    For each enemy

    Trigger once

    {

    Spawn icon

    }

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the feedback, I really appreciate it :D

    1. Not intentional in the original design, as such bullets now only live just beyond the screen, mostly avoids this. Also, the range at which enemies become active needs tweaking.

    2. Known bug, currently the detector will move to the left or right if you press those keys while in cover, and pressing down while the detector is over cover is what leaves it - so the detector being moved messes this up! As such if you find you can't exit cover pressing up to place the detector over cover and then down again fixes it.

    3. Fixed! The sprite animation data was corrupted causing the bullet spawn issues and the Z-ordering.

    Haha I'm pleased you like the celebrations - it was a silly idea I had but one that turned out quite charming :D I like the idea of different celebrations though, I may look into that. Maybe different celebrations for different enemy types!

  • Thanks! Yeah, I've barely started adding all the gameplay mechanics, just got the basics down.

  • Haha no no, I was just willing to put a special character in the game for whoever solved the problem! Oddly there were some weird Z order issues with the old sprite which seem to be sorted now too, glad the whole ordeal's done with and I can continue with it.

    Oh also, if you tried it I'd love some feedback.

  • Fixed the damn thing! Seemingly the sprite object was corrupted somehow, it sometimes wouldn't let me duplicate frames and such so I should've considered this sooner. Created a new sprite, imported the old images in and it's all fine! Phew, relief.

    shinkan Seeing as you're the only one attempting to help I'll still honour that reward if you fancy it ;)

  • There's the player collision, with the sprite pinned to it, then there's also a detector whose position depends on the direction of movement - it's there for detecting "cover" walls (holding up near them takes cover, then down again to exit).

  • I'm working on a top down shooter but when the player sprite overlaps a solid object such as a wall and fires, the bullets spawned are pushed out of the solid. Is there any way to avoid this? I've tried setting position after spawning and various other things, but no joy.

    I'd assumed that this was a feature of Construct, but it doesn't seem to happen for enemy bullets so now I'm not so sure.

    There's a link to the game at the moment below

    here

    ASDW for movement and right-arrow is fire at the moment. When you try it you'll see as you near a wall the bullets spawn far away from the weapon.

    Any help would be gratefully received as I'm desperate! In fact, whoever gives me a solution can have a special character in the finished game ;)

  • Sounds like something really interesting you're working on. I've done a fair bit of work using Construct with databases and PHP but I've not quite figured the best way to do what you're needing.

    Would it be possible to only have a database entry for squares that contain something? Then use a script to get any entry within the x/y range specified whereby a certain field is not blank?

    This would bring down the number of results returned by the script and be more efficient - but if you need info from EVERY square then it's no good.

    Alternatively, run a script several times, once looking for each resource or troop type? That would also limit the number of results significantly and you could still get every square in the range - again this would also be helped if there are empty squares as it won't be retrieving them.

  • I'm working on a top-down shooter at the moment and it's being going great. However there's one niggling problem I've had from the start which I've only just attempted to fix.

    So I've discovered that when I spawn bullets over a solid they're pushed out. I can see the reasoning behind why Construct would do this, but being that the collision for the player and its sprite are separate there are going to be times where bullets need to be created over the solid walls.

    Is there any solution to this? Am I going to have to come up with my own solution for collision detection so that I can avoid using the 'solid' behaviour?

  • Oddly enough this worked, while I was doing something very close to this which should've also worked in theory.

    Anyway, nevermind it's working now - thanks for the help! :D

  • So, I have a spawnpoint, each one spawns an enemy collision, then a sprite which it pins to the collision.

    I want to change the animation of each sprite when its associated collision is moving (8 direction). I've got the movement working fine, they move as individual enemies but yet the problem is that they will ONLY change the animation when ALL instances of the collision are moving, and ALL instances change their animation, not just the ones that are actually moving.

    What I want to do is have a sprite animate ONLY if the collision it's pinned to is moving.

    I've tried assigning an ID instance variable and checking the sprite's ID matches the collision ID and it still works the same way.

    Any help would be massively appreciated as this project WAS going so well until now! Thanks!

Stormsong's avatar

Stormsong

Member since 26 May, 2011

None one is following Stormsong yet!

Connect with Stormsong

Trophy Case

  • 13-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual

Progress

15/44
How to earn trophies