Antylope's Recent Forum Activity

  • Thanks, it works perfectly.

    But, let's be clear.. the manual isn't a InDeep explanation of the functions and is not even close. Lot of information that could be clearified in the manual is actually in the forums (even this simple function to prev and next an animation could be cleared out in the manual in the Animation controlling section).

    Either way,I'll check it out in the future just in case.

    bye

  • On Next pressed
      -> Sprite: Set frame to (self.frame+1)%self.Animationframecount
    On Prev pressed
      -> Sprite: Set frame to self.frame = 0 ? self.Animationframecount-1 : self.frame-1
    

    Should work fine

    I'm trying to use it but it says

    "frame" is not an expression or instance variable in "Object"

    Any idea?

    Thanks anyway!

  • You can use the animation controls within the sprite object:

    Event: On Button press -> Action: SpriteName -> Set frame (Frame number)

    EDIT// On re-read, you want a function that goes to the next frame instead of a specified one? Like AS nextFrame? That one I'm not so sure, you could manually specify each frame using the set frame action, but this may not be what your after

    jajaja, sorry, didn't saw the edition. I guess that I should set every posibilty but I'm sure there must be an easier way to do it. If it isn't I would suggest it's integration for the next launch.

  • Event: On Button press -> Action: SpriteName -> Set frame (Frame number)

    But I should cover all the posibilities in events and actions? I mean, If the object is in frame 2, the prev button should set it to 1 and the next button should set it to 3, but, if the object is in frame 3 the buttons will still work like if it was in 2.

  • I swear I search in the forums and tutorials but I coudn't find the action that let me set an animation to a previous or next frame.

    I'm making a prev and next buttons that, when clicked, will change the frame of an object; how can I do that?

    thanks!

  • Thanks for the example Yann, it works great!

  • Thanks man! I was getting crazy trying to figure this out.

    It works better (in my case) with the onbounding scrolling set to No.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > I did this too in a game, and it worked quiet well, at least for my game.

    > I put a "Scroll To" behavior on the player and then I used the following calculation:

    >

    > clamp(1 - Distance / (LayoutHeight + LayoutWidth), 0.10, 1.0)

    >

    > Hope it helps!

    where do you put the calculation? and does it work with all kinds of games?

    Same question here; where do you write the calculation?

    bye!

  • jajaja! It's not bad actually. I'm out of the 1st option since I cant use families (still in standard edition). I'll try the 2nd option.

    thanks

  • As far as I tried, the event "on collision with another object" makes you specify an object; what a I want is more global: when it collides with any object whatever it could be.

    I could add an invisible wall in front of any solid and use it as target for that event but I supose there's an easier way to do it.

    Any ideas?

  • Hi! I reopen this thread with another bullet behavior issue; I'm trying to make the bullet destroys itself whem colliding with any solid but I can't find any event similar to "on collision with a solid" or something like that. I supose it should be an easy task but I coudn't find it.

    thanks!

  • Did a bit more digging around here and solved the problem--my "hosts" file was configured in a way that didn't allow C2 to use the localhost address. Just in case someone else is having a similar problem, here are the steps I took to fix the issue:

    First, I located the folder that contained my 'hosts' file (c:/windows/system32/drivers/etc/) and opened the actual file using Notepad++ (but Notepad will do, if that's what you've got). In my case, there were two entries near the top that were of particular interest to me:

    #127.0.0.1       localhost

    #::1             localhost

    Notice the '#'? That means it's a comment (i.e doesn't do anything). Delete the #'s. I had a couple entries following this one that were NOT commented out, but used the same address (127.0.0.1). I'm fairly sure I'll need them later, so I simply put the pound symbol (#) next to those to comment them out, as well as save them if I need them later. Finally, I saved the 'hosts' file.

    HTTP preview now works, as does the mirroring/flipping <img src="smileys/smiley36.gif" border="0" align="middle" />

    thanks man! I was having a bad time trying to figure out why the preview wasn't working anymore. It bring me another problems but I'll look at it later.

Antylope's avatar

Antylope

Member since 6 Mar, 2012

None one is following Antylope yet!

Connect with Antylope

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies