Rable's Forum Posts

  • Did you try creating large invisible rectangles for the edges? Make them wide enough so that the ball will never be able to go through them.

  • Hi everyone,

    I have a problem playing a video on Safari. The video will simply never be displayed, on both Mac OSX and iOS. It works fine on Firefox and Chrome.

    Using the Video object I specified each of the 3 formats, but from Safari inspector it seems like only the MP4 is trying to be accessed. What's weird is that when I copy the direct link to the video from my server (using Cyberduck), and copy it in Safari, the video is played correctly in the browser.

    So to sum it up:

    • The video is in the correct format and can be read by Safari
    • The video is playable directly from the game's folder.
    • When played in the game, the video will not show up.

    I've read something about MIME types, but I guess that as the video alone could be played from the server, it shouldn't be that?

    Any idea of what's happening?

    Thanks !

    EDIT:

    I finally solved the problem. It was due to a CAP letter being automatically shrinked down to low case by (probably) the FTP client Cyberduck. For some reason, every browser managed that except Safari. So if you run into the problem, be sure to rename your videos' names to low case.

  • Awesome, exactly what I was looking for! Never thought about using this. Thanks a lot!

  • Hi everyone,

    I'm looking for the cleanest way to trigger actions if a given object is currently not existing on the layout. I don't know any existing conditions to check that, so what I generally do is:

    (If I know there is no invisibility going on)

    • Object is visible > (no actions)
    • ELSE > (whatever actions I want to do)

    I also sometimes do it with "is on screen", but it's not clean. If the object is on the layout but outside of the screen boundaries and invisible, it will not work.

    Am I missing a simple action to check that, or is it a cleaner way to do it?

    Thanks!

  • Sorry, I solved the problem. The object wasn't displayed correctly due to the cache of the browser. Switching to another browser makes it appear correctly and your answer is thus everything I need !

    Thanks a lot !

  • Thanks a lot for the fast reply, Kyatric. But I'm afraid it doesn't fix the problem. :/

    When the objects on the layout are destroyed then are created again, their size is then normal. But the objects which are present on the layout upon loading are still very small. (While their size on the layout in the editor is correct, it only happens in the preview)

  • Hi everyone,

    There is a problem that I encounter very often when I'm replacing a sprite's image with another one which has a different size.

    If I resized the initial image in the editor, I can't manage to have the updated sprite (the same sprite with a different image) at the right size. This happens even though I manually entered correct size in the properties.

    So to be more clear:

    • I used a very small (10x10 px) image for the sprite Object (eventually I resized it in the editor?)
    • Now I want to use a bigger image (50x50 px) , I replace it in the edit image window.
    • When previewing, it is my new image but resized so that it has the size of the previous version of Object (very small)
    • The sizes in Edit Image window and Properties panel are correct!
    • It looks like after going to another layout and coming back, the images have a correct size. However, the first time the layout is reached, the size is always wrong.

    I can't manage to give Object its correct updated size consistently. Is there a solution, or should I duplicate Object in order to create a new object and update my code?

    Thanks!

  • Lordshiva1948

    Thanks for the links! Could this be implemented into my construct code? Because I don't see anything related to Construct 2 on these pages. These aren't even plug-ins but seems to be completely external softwares. I really don't see how I will be able to use that into my C2 game. Thanks for any help!

  • Hi,

    Is there a way to simulate a mouse click, in the same way we can do it with the 8 direction behavior?

    Here is what I'm trying to achieve : to go through dialogs in my game, one has to click to pass to the next phrase. But I'm now implementing Gamepad controls. I'd like to make it so that when pressing button A on a gamepad, a click is simulated so that it launches the next phrase without having to rework my code.

    Possible?

    Thanks!

  • Works perfectly! Thanks a lot!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I would like to add a sine (size) behavior to an object so that its size varies from 0% to 100%. Is there any way to do this?

    Up to my knowledge sine (size) always consider that the normal size is 100%, so I can make it vary from 0% to 200% but then the quality gets too low. Setting the scale to 0.5 before activating the sine behavior doesn't help either. Any idea how this could be achieved?

    Thanks!

  • Oh, I wondered what SID was about. I will remember that for the next time.

    Thanks!

  • To keep you updated, I manage to do what I wanted. And if someone ever needs to do it, I'm going to explain how I did it.

    What I had was an array with 40 X entries and a number value in each of them. I wanted to create given object from a family based on this value. For this I created an family instance number variable and assigned a different value for each object in the family.

    But as blackhornet told us that doesn't work, as we can't create a given instance from a family based on a variable. The instance created will always be a random object type from the family.

    It was possible however using rexrainbow 's plugin Nickname. Instead of defining a number instance variable for each object type in the family, I added a family behavior Nickname, and entered a different string (A, B, C, D, ...) for each objet type in it.

    I then stock these values in the same array as previously but as strings.

    Then the below event just creates an instance from the family (placementTrumpet) which has the same Nickname than stocked into the array at curX.

    Exactly what I wanted to achieve, thanks a lot rexrainbow for the awesome plugin!

  • rexrainbow

    Thanks a lot! This is a very interesting plugin and the capx linked helped a lot in understanding it!

    It's still a bit mysterious for me at the moment but I can definitely see the potential. I'll see if I can manage to use it properly in my code.

  • I downloaded and tried the Nickname plugin, but I still don't see how it could help me select a given instance of a family based on a number variable.

    Sure, I can assign a nickname to each object, but I don't see how it makes it different in my case than just creating each different object.

    The problem is that the family's name needs to be a string : "one" instead of 1.

    In the latter case I would be able to call the nickname based on the number variable, but I don't see how to do that with the string.

    Am I missing something? Or is there any other way to achieve this?