vee41's Recent Forum Activity

  • Something like this might work for you:

    When enemy is hit

    .. Set enemy.destinationX to enemy.X-100 (away from palyer or whatever you wish)

    for each enemy

    enemy.destinationX is not -9999

    .. set enemy.position( lerp(enemy.X, enemy.destinationX, dt) )

    .. if enemy overlaps with object ( stone or something that should block the enemy)

    OR

    .. enemy.X = enemy.destinationX (if we've reached the desired oushback position)

    ... set enemy.destinationX -9999

    Probably should have written that in a .capx instead, would have been a bit clearer.. :)

    EDIT:

    Heres the .capx:

    Example thingy

  • I second, it's quite annoying.

  • Using move to - plugin might be what you are looking for. EaseTween is another alternative. You can achieve same behaviour with default actions too, but using the plugins is much cleaner.

    scirra.com/forum/behavior-moveto_topic44845.html

    scirra.com/forum/behavior-easetween_topic53288.html

    EDIT: Your wait action problem is due the fact that loops execute in one tick. So what happens is all the stages f the loop run instantly. You could use 'wait X*loopindex' action.

  • Check these threads for something that might fit your purposes (or not): Check me

    And me

    Search is your friend. :)

  • I'd take a look, if you could upload a version without the cooldown plugin :)

    Nevermind, here is an short example how you could do it:

    Dual guns example

  • I'd take a look, if you could upload a version without the cooldown plugin :)

  • Thank you so much. That's exactly i needed.

    Please provide one more information. i have a sprite object that catches everything falling from the sky. and i want it to stay in the floor and when i move the mouse along with it, it needs to move only in left and right. not in 8 direction. ?

    Every tick

    .. set sprite.X to Mouse.X

  • Two quick ideas :

    a) Invisible sprites at the edges of screen (parallax 0) and conditions to scroll the screen when mouse is overlapping them.

    b) Check each tick for absolute mouse position to detect if it's near edge of the screen.

    After you've detected where you wish to scroll, there are nice examples of how to scroll the screen in the FAQ thread. :)

  • This example might be what you are looking for:

    EvilSprites demo

    It's a simple example of collision between two instances of same object, I added a little 'infect' example there to show how you could achieve this. The problem with your approach is in the way you handle those collisions, take a look at some picking tutorials in the FAQ thread here and they should explain in more depth what I did in that example. :)

  • > Didn't really look through your other events, was in a hurry. :)

    >

    > Harvester example

    >

    > I kind of did in a different way that should be way easier to manage and expand. Left few comments in the events, but feel free to ask if there is something weird there :)

    vee41

    Nice! I think im understanding better, i liked your event order, i feel so good you could solve the problem that i couldn't figure out, i really appreciate your help! :)

    I have a question...

    However, you removed "Animation Frame = 2" it's used to give an eye candy like impact, isn't possible to implement back?

    That's a a good point, I added an action to match the gathering animation speed with gathering speed of the harvester. I updated the link I posted before, was this what you were looking for?

  • Didn't really look through your other events, was in a hurry. :)

    Harvester example

    I kind of did in a different way that should be way easier to manage and expand. Left few comments in the events, but feel free to ask if there is something weird there :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add 'for each harvester' above your 'is gathering' event. Right now every gathering harvester is picked and same events are executed for each one. You can observe the behavior by setting a debug text to 'Harvester.pickedCount' at start of gather event and you'll get value 2 back, meaning that there are two harvesters that fulfill the 'is gathering' condition.

vee41's avatar

vee41

Member since 12 Apr, 2012

None one is following vee41 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies