Aquanex2's Forum Posts

  • Here's a different approach. Uses a state-machine rather than a bunch of booleans, uses timers, has a single Fade behaviour, calls "restart fade" rather than start fade (that seems to be the real trick). I think part of the problem may be too many conflicting Fade behaviours. This did end up a bit complicated too, but the advantage is you can cancel any state, should you need to - something you can't do with Wait.

    http://www.blackhornettechnologies.com/Construct2Stuff/FadeEnemyCopy.capx

    You've really helped me a ton! Once my game is complete, I'm gonna put your name in the Special Thanks portion of my credits. Thank you so much, blackhornet.

    I'll check back with you if I have anymore issues/questions.

  • This seems extremely complicated. Can you explain what you want? I get the general idea, but specifically, how should this work?

    When you get in his line of sight, He fades away, gets right behind you and fades back in and attacks. After that he fades back out, goes back to where he started, then fades back in. The only problem is that once the whole cycle starts again, he stays invisible after he fades out.

  • I'd have to see an example.

    Took me a while, but here you go.

    https://www.dropbox.com/s/m2witzr2nv9sz ... .capx?dl=0

  • You can use "Is visible", or "Compare opacity", depending on how you make it invisible.

    I'm using different fade behaviours to make him come in and out of view, but when all of the fading is done and everything resets, he is invisible when fading out again. I checked the debugger, and it says that the fade-In behaviour is still in the fade-out stage, even though I set it to zero. Any ideas on how to fix this?

  • Use an instance variable if there are multiple of them. Call it "hidden" and make it a boolean or whatever you want, then do whatever you do to decide when the enemy hides, and make hidden true at the same time.

    You can then say:

    > if hidden = true
         enemy: set collisions disabled
    else
         enemy: set collisions enabled
    [/code:1r3odram]
    

    Thanks! I'll give it a try!

  • I want to make an enemy that disappears, and then reappears to attack you, but I don't want you to be able to make contact with him unless he his visible. I've tried to use variables, but I don't think that I'm even close to what I want. I can supply an example of my capx, but it might take some time.

  • It's not really my idea. I read it a long time ago here in the forum. But I didn't finde the thread anymore.

    Thanks for that info! Wow I knew it was easy! Thanks a lot!

  • I'm probably more of a beginner, so maybe this is bad advice ^,^ ;

    As I understand it, the thing you are trying to do can be solved with a bit of clever maths being used to create an offset.

    But my math is weak, and I suspect that approach is better suited to more code heavy environments, so instead, This is what I would do:

    Create an invisible sprite to serve as the radius, with it's origin and next image point being the distance between the two objects. Set this arm's position to the object you want to be rotated around and attach the rotating object to it's image point. Rotate the arm ( I think using Sine movement behaviour on the angle property would be the easiest way of getting this result, but I haven't tried that before.)

    Sounds a biiit complicated, but I'll give it a shot!

  • This is probably something very simple, but I'm not very experienced, so I'm not sure how to do this. I'd say that I'm somewhere in the upper range between a beginner and an Intermediate. I believe I know enough to understand any suggestions.

    Please!!! Thank you so much in advance!!!

  • You can keep track of the current song when you play it, and apply more logic to test if it keeps playing or needs to switch. And/or use "Is tag playing".

    Thanks for all your help! You've steered me into the right direction!

  • http://www.blackhornettechnologies.com/Construct2Stuff/keep_music_playing.capx

    Oh, I did it slightly different... Thanks for the example! It works! But what if It's a different song between layouts?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check if music is playing first then, and only start if not playing.

    I got rid of the event that stopped the music and the end of layout, then I did this, but it still restarts the music.

  • Music will naturally keep playing, so you must be restarting it either in your "On start of layout", or somewhere else.

    Yeah, but I have a retry button that restarts the layout, wouldn't that make the song start again without ending the other song?

  • I have a Level Select Layout, but I also want a World Select layout. The thing is, I can't figure out how to keep a song playing, even when the World Select layout ends, and it changes to the Level Select Layout. I don't want it to restart, just keep playing.

    And the same goes for the levels. I have a song that plays, but when you restart the level, the song restarts, which isn't really a big deal, but it would be better if it just kept playing.

    How do I do this? Thanks in advance for any advice!!!

  • >

    > > Try adding a sub-event: System Repeat X amount of times.

    > >

    > > Helpful to upload a capx or screenshot of your events.

    > >

    >

    > Okay thanks, I'll show you.

    >

    https://www.dropbox.com/s/2kz7noqjoak7s ... r.png?dl=0

    Irregular4 is the enemy to be spawned, and SpawnIrr4 is the function. Spawn is the object that spawns right before the enemy is spawned.