eli0s's Forum Posts

  • Yes, of coarse, the second method is the one you'll have to use, just add move at an angle (angle(Player.X, Player.Y, Enemy.X, Enemy.Y)) to drive the enemies away.

    Simple way http://www.eli0s.com/Tests/RunningAwayEnemiesSimple.capx

    A bit more advanced using Physics http://www.eli0s.com/Tests/RunningAwayEnemiesPhysics.capx

  • Ok, since I don't know which method will prove more useful, in this example capx I move to enemies away with the platform behavior (when the ground is uneven) and on just the x axies if the enemy doesn't heve to follow any ground changes...

    http://www.eli0s.com/Tests/RunningAwayEnemies.capx

    Tell me if it's close enough.

  • Ok, have a look at this example capx and tell me if this is what you're after.

    http://www.eli0s.com/Tests/FadingSprite.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1) You have to set the parameter "Set Angle" to No on the Bullet Behavior. This is braking the set angle of motion.

    2) You must FIRST spawn the bullet and AFTER set the angle of motion.

  • Please check your email.

  • pm your email, I'll send you the file, it will be so much easier if you see the capx... Otherwise for the first part 5Type basically already covered it in terms of code, you have to dig a little into expressions...

  • What do you mean it's not working? It downloads just fine on my part. Perhaps you have some antivirus or popup blocker in your browser?

  • Is this transparent background a Sprite Object or a layer with its Opacity turned on?

    Either way you can set a variable to check if the BG should fade or not and if yes, add to its opacity a value multiplied by dt.

    On the Sprite object it should look like this:

    isFading---> set Sprite Opacity to self.Opacity + (a value) * dt

    This will gradually add (a value) to the spite's opacity until it it reaches 100 (it' cant go any higher).

    The same applies if the opacity values that you want to alter are on a opaque layer, the difference is that you'll get the layer's opacity actions on the system actions.

    If you can clarify what is it that you want to fade I can make you an example capx...

  • Are you talking about top-down movement? Side-scrolling Platform?

    Anyway, you can either create an invisible sprite that covers the area that you want the enemy to be alerted with and pin it to the player, or compare the distance between the Player and the Enemy and when it's below a threshold trigger the moving away action.

    If you can be more specific it will be easier to help you.

  • Something like this..?

    http://www.eli0s.com/Tests/SpaceShip.capx

  • +1

    Perhaps adding the comment could be case sensitive. If a condition is selected -add comment above the event (the way it is now), if any action is selected -add comment above the action. This way you wont have to add comments as actions and you'll have a consistent workflow.

    I will also really like to see the ability to colorize the events, sub-events, comments, variables and groups . That will be awesome!

  • In regard of copy - paste frames,

    While you can't technically copy - paste frames, you can however copy/paste the context of one frame (the image) in to an other frame elsewhere. Personally I prefer to just re-import the frames, it's faster.

    Although, sharing common frames between animations (even in the same animation) besides convenience perhaps can also introduce a way to cut down the exported file size (?).

  • Thank you for your kind words!

    Since you create the Sprite5(s) at run time, it shouldn't be behind the enemies. Are you sure that both objects (the enemies and the Sprite5s) exist in the same layer and/or that the layer1 is the top-most one?

    If they are on the same layer, after the "Create object Sprite5 on layer1..." action, add the "Move to Top" action on the Sprite5 (is in the Z Order Category). This should fix it anyway.

  • Ok, this is the best I can do...

    http://www.eli0s.com/Tests/BarkingHeads.capx

    I removed the pin behavior as it doesn't inherit the mirroring of its parent, instead I used the every tick set position to an image point and mirroring actions for the heads.

    The enemies move randomly left and right with the platform behavior (if you only need them to do small movements that do not jump or follow uneven ground, then the Platform is an overkill) and when the player is in range they follow him/her, barking (hopefully) facing the right way...

    Use the arrow keys to move the player around (default controls).