immortalx's Forum Posts

  • The image isn't showing.

    I suspect that you're not picking the right box instance that is "paired" with the specific enemy instance. It works for the player probably because there's only one player object and one player-box object.

  • Why don't you convert the svg files in an external editor and then have 2 different versions of the game hosted? One version with the graphics you already have and the other with the higher res. Then have mobile browsers request the first version and desktop browsers the other.

  • Is there a CSS property to set the color of the selected item when a list (List box type) is unfocused?

    When the list has focus the default color is blue. I'm trying to keep that color whether focused or not.

  • Santhenar

    Instead of setting actions when the event is triggered (which I'm guessing it goes true for a very brief moment and then returns to false), try to set a boolean to true.

    Then create a new event bellow, check if the boolean is true (which will be the case if the event was triggered even for a brief moment) and do your actions there. Maybe that will help.

  • It is sort of ironic it is marketed as something that would prevent anyone from coding, yet it makes the non-coders want to code. It makes the code a little more De-Coded, if that makes any sense.

    Very, very true!

    In fact, I find it strange because this is its best feature and is advertised as the opposite! It's a tool just like the modern IDEs are, compared to the plain text editors people used to write programs on. Yeah, I know it's not a programming language, but what's the point? Those IDEs with their intellisense and debuggers and whatnot, did help the programmers make the transfer from an idea in their head to something that works, easier. Isn't that what C2 does already?

  • If you add a 3rd dimension to your array you can effectively have a "stack" of all the 2d arrays you have already created, in one big array.

    I don't know if it helps at all, but if you imagine the 3rd dimension as a z index I guess you can modify your events to "pull out" the ones you want.

  • MadSpy

    In case it's any use to you or someone else, I managed to modify the official drag n drop behavior and added this functionality.

    https://dl.dropboxusercontent.com/u/14855413/c2/dragdropmod/edittime.js

    https://dl.dropboxusercontent.com/u/14855413/c2/dragdropmod/runtime.js

    Example capx:

    https://dl.dropboxusercontent.com/u/14855413/c2/dragdropmod/ddmod.capx

    To any developers that might see this: I don't know a thing about javascript and it seems I was just lucky to put the right things in the right place

    Although it works, I'd appreciate if you can take a look and tell me if there's something terribly wrong in this mod.I know that Ashley says not to modify the official plugins, but I just don't have the knowledge to make a plugin from scratch.

  • Thanks a lot for your time and effort man!

    Yes, it partially works so I guess I'll have to do some fine tuning.

    I believe that a modification in the behavior will make the constraints more consistent though.

    Thanks again for the valuable help!

  • MadSpy

    Sorry to bother you again and again but I would appreciate if you can give me an example.

    What I'm trying to do is have a sprite with 3 animation frames and depending on which frame is playing, constraint the movement to different axes.

    (My English is not good too, so that makes 2 of us!)

  • MadSpy

    I don't see an option in the events to change that! The only available actions are to set the behavior enabled/disabled and to force drop.

    Maybe I'm missing something?

  • Try Construct 3

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

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

    An action to switch to one of the 3 states (Both, Horizontal only, Vertical only)

    ex: If the state in the editor is set to "Both", have the availability as an event action to switch to "Horizontal only"

  • Hi guys,

    Is there a chance that the official Drag & Drop behavior can be modified, so that the axes property is available as an action?

  • Waltuo

    Look at this updated capx:

    https://dl.dropboxusercontent.com/u/14855413/c2/bbox2.capx

    I just added an animation frame to the dummy sprite, that switches depending on if you have the gun or not. I also scraped the re-sizing part.

    The second frame has a collision poly closer to what you want. If all your guns are about the same size, this should work.

  • About your second problem:

    A good practice is to have a dummy invisible sprite with the platform behaviour and your main player sprite attached on to it.

    It's the invisible sprite that all collisions should be checked against and you can alter its size on runtime, depending on if the player has acquired the gun or not.

    https://dl.dropboxusercontent.com/u/14855413/c2/bbox.capx

    In the example above I made the invisible sprite semi-transparent so you can see what's happening. Press G to give your player a gun and you'll see the bounding box growing. Press H to destroy the gun and the bounding box shrinks back.

    NOTE: The enlargement of the dummy sprite depends on its origin point. You'll see that it is placed to the hard left, so that when the player changes direction you have to mirror that sprite too.

    EDIT:Forgot to mention that you can always have a different animation with the player holding the gun, as an easier alternative to the above.

    Which method you prefer depends on if your player has dozens of guns he can get or just a couple.

  • Drag the sprite to the top left where the canvas frame is. Right click to paste. Then drag again the sprite to move it out of the way.

    Now if you place the mouse cursor over the canvas, the rgba values will be displayed. If you want just the alpha value replace "rgbaAt" with "alphaAt"

    https://dl.dropboxusercontent.com/u/14855413/c2/canvas.capx