eli0s's Forum Posts

  • Dear R0J0hound, thank you for your input. It's unfortunate that this is inherently to Js.

    I'll try to work something around your suggestion!

  • Ashley ,

    I've imported a video file named VideoTest in both mp4 and webm formats.

    I set up the Video object and type the names of the video files (VideoTest.mp4, VideoTest.webm) on the H.264 source and WebM source fields respectively.

    If I preview, the video playbacks OK.

    If I export and upload the folder structure on the server, the video doesn't work. Looking on the exported folder, i see that C2 exported both video files with their names in lowercase letters (videotest.mp4, videotest.webm). I believe this is causing the problem.

    Is this by design? Does indeed causing the problem? Should we only import and use files that are named with lowercase letters?

    Thanks.

  • This is something that bother me also. When a Sprite's movement is based upon the mouse position, when the layout begins the Sprite begins to move without the user doing anything, just because the default mouse position is where ever the mouse is on the desktop at the time of the game's initialization.

    Ideally, the mouse object should be inert until the user does something or the game tells it to do something, and the initial position should be fixed (if so desired).

    Check the attached capx to see what I mean. Is there a workaround that?

  • You're welcome!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, sorry, I misunderstood you. No, I guess there isn't any option unfortunately.

  • Check the attached capx.

  • On the Text object's properties there is a Horizontal alignment option. By default is set to "Left" but you can also choose "Center" or "Right".

  • I guess you mean a percentage of the screen's or the layout's width or height...?

    Of course it's possible, you just need to write a simple math expression. Check the attached capx.

  • jeffige , Aphrodite and Katala already covered pretty much everything about this. You have misunderstood what the Platform behavior does and what it does not do and for what purposes it's made for. Let me put it in my words too, just for the sake of argument.

    Forget about the animations for a moment. Lets focus on a simple box. How do you make it move..? You can can create 2 events just to make it move left/right:

    When right arrow is down---> box set X position to self.X + 350*dt (to move it 350 pix per second like the Platform behavior does)

    Equally, When left arrow is down----> box set X position to self.X - 350*dt.

    So far so good. But how do you make it accelerate and decelerate to and from this 350 pix per second speed? You''ll need to make some variables that are interpolating from 0 to 350 and 350 to 0 speed. That's a bit complicated but doable.

    Now, how do you make it jump? You need a way for it to move on the Y axis in a parabolic manner. I wont even pretend to know the math behind it. That's even harder. But let's say that you did manage to make a system that does that, and even simulate the acceleration from the gravity.

    Now you are left with the collision detections. When the box is on the floor, when it has a wall on the right or on the left. This is very-very difficult to make with events. But it comes by default with the Platform behavior.

    Having said all of the above, up until now nothing has anything to do with animations. These are events that sorely make a box behave/move like Mario.

    If you want animations (visual representations of someone doing something), you can use the key-presses to trigger the corresponding animations on a separate Sprite (pinned on the one that has the Platform behavior-the box).

    Now (finally), for ducking and sliding.

    Ducking should just trigger an animation and perhaps decrease the height of the Sprite that hold the collisions for your character (the one I was referring to as box).

    Sliding is a bit more involved. You could emulate it with the following events, including a boolean variable and the timer behavior:

    When Down key is pressed----> set Boolean "Sliding" to True , set timer "Slide" to 1 second

    If boolean Is Sliding----->Platform, Simulate movement Right (for example), set Platform max speed to 600 (for a fast dodge)

    On timer "Slide"----> set set Boolean "Sliding" to False...

    I hope I was helpful and sorry for the long post... X)

  • ?! If the action you want to trigger is irrelevant to the Platform behavior (not jump, not right/left, not fall through a platform) meaning there isn't any physical movement to it, then just trigger the corresponding animation when the down key is pressed!

    What is is that you want see been simulated by pressing the down button? The DUCK is an animation, not a Platform based action!

    Am I missing something here???

  • jeffige , what will this down option simulate? There is already a Fall through action for the jump-through objects.

  • You can Shift+click to make multiple selections but if there are a lot overlaps that won't be as easy as it sounds (and you say you don't want to pick each one by it self). As hundredfold said, a rectangular selection that envelops all the sprites will do, but perhaps it will select more Sprites than needed, if, again, overlapping sprites exist. The safest way will indeed be to move all of the desired Sprites to a separate Layer, lock other layers and pick them from there.

    After selecting them all however, there is the option of "Wrap selection", which will make all sprites behave as a group (rescaling for example will happen from the centre of the wrapped selection and not for each sprite individually).

    To use "Wrap selection" right click on the selected Sprites and choose it from the drop down menu,

  • volkiller730 , never realized that was there! Thank you

  • TiAm , oh well, it's nice to be different I guess :O

    But yes, since the jerking is much-much-much less than before, I won't complain

  • Colludium , by the way, your test still produces the same integer spike values (I'm cursed, no other logical explanation exist), but this time the scrolling background move without any jerkiness!