sgn15's Forum Posts

  • 1. How do I randomly pick from a set of music files to play (not looping) at start of layout and then after it finishes, select another one from same set, and so on.

    2. If I have a 5mb ogg file and import it to my game, can I still make the size of ogg file smaller after it is added to the capx? bottomline is I don't want a big capx size and I would like to know how to make the sound files as small as possible, possibly as small 200kb per ogg file.

  • there's an effect called "Inverse" that inverts the colors of the object

  • korbaach

    blackhornet

    ok. thanks

    but it still can't distinguish between object instances.

    I saw the description of Compare two values in the add action window. It said there it's not for objects.

    How do I achieve this for each instance of an object? Is it possible?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Now, I had to make a new test file showing what I am saying because my game is already complex and it won't help anyone trying to solve this problem because my game has many systems already implemented.

    The example file uses keyboard inputs as conditions BUT they are just for example purposes.

    In my game, I don't use keyboard inputs as conditions, but you get the point of the problem.

  • blackhornet

    It still doesn't work.

    I used "Compare two values" for the System: Random (1) <= Player.Probability condition and I think "Compare two values" can't detect between object instances. Now I need an alternative way of comparing same variable but can detect between instances of Player object.

    Any ideas?

  • If I want to make an event happen on 50% chance, I add

    System: Random(1) <= 0.5

    But, if I want to make an event happen on an Probability% chance and Probability is an instance variable of Player, using these events........

    System: Random (1) <= Player.Probability

    For Each Player

    ....... It doesn't work

    I have events setting the value of Probability instance variable depending on different situations. and yes, I checked that the values are correctly being set and none of the values are zero, I even tried setting Probability to 1 so 1 means it should always happen, but it is not working.

    Help please

  • Colludium

    thanks, but when I tried ctrl+F5, it loaded the debug preview and the old bugs are still there.

    Any idea as to the source of this problem? It's still working fine for that single layout that I have been using the past few weeks for testing, but all other layouts using same event sheet have the old bugs

  • So I have been working on this game of mine for several months already, discovering bugs, fixing them, adding new stuff. All my layouts use the same single event sheet.

    I kept using this single layout for testing. Now I have fixed all the bugs I discovered so far. I tried previewing other layouts and the old bugs are still there (even if they are using the same event sheet).

    I'm not sure why this is happening. I have NO layout-based condition or action in that single event sheet.

    Please help. Thanks.

  • korbaach

    Here is a simplified version of what I wanted to do. My original file is too complex (it has many complex systems for my game so I made this new file).

    Hold pressing X in air will make the player go to attack animation. During this animation, pressing left or right won't have an effect.

    In my original file, pressing left or right during attack in air gets it stuck in air forever.

    In events, I use "Control" because I need it for my other systems. State and Gravity are also variables I used in my original file. They have other uses aside from how I used them in the file attached. Too many to explain and not related to the problem.

    Long story short, it works perfectly here in my new file, still problems in old one. It's 1am here, I will look tomorrow again.

  • korbaach

    thanks again. I have seen your file but I haven't tried it on my file yet.

    https://www.scirra.com/manual/100/platform

    I'm not sure why the "Platform: Start ignoring input" is not working as described there in the manual. That (disabling the arrow keys, while letting the platform object still able to free fall) is exactly what I needed. I tried "Platform: set disable" but it's not working like I intended.

    Also, why does your file takes literally less than a second to load on preview? mine takes like 45 secs at the very least to load everytime.

  • korbaach

    Hi. thanks for the file, but it doesn't work on my game because I have no events that has conditions based on pressing the directions (arrows). My platform object has the default controls as "yes".

    Attack:

    The player (platform char) jumps up, then I press X, player stops falling down and uses attack animation, then after animation finishes, goes back down to ground.

    The bug (originally explained) happens during when I press left or right arrow during the attack animation while in air, the player gets stuck there forever and never goes down to ground.

  • I have a character object with platform behavior. Player has an attack where it jumps in the air and stays in air for a bit. I want to disable the functioning of the arrow keys (button for directional movement) while I am in the air.

    I tried "Platfrom: Start Ignoring Input" and it's not disabling the arrow keys. How do I disable the keys?

  • Sumyjkl

    I'm not using physics. any other method without using behaviors? or at least not using physics?

  • This is the situation:

    several objects all over the screen, then they get "sucked" or "pulled" into a single point (it's like a black hole or it's like Magneto from X-Men attracting all metal objects from everywhere into himself).

    How do I code the "sucking in/pulling in" effect?

  • eli0s

    I can only describe this problem like this picture

    http://oi62.tinypic.com/2sb64c3.jpg

    Hero and Enemy both have platform behavior.

    gray boxes are solid floor objects

    blue arrow - velocity of enemy being pushed towards solid

    green arrow means the hero punches the enemy

    The others are already listed in the picture

    Bro, I remember you. You helped me before. Can you help me also here?

    platform-char-same-angle-as-diagonal-floor_t108404

    this is the picture explanation

    http://oi59.tinypic.com/2utqbgy.jpg

    condition for this is of course when player character is overlapping solid object