RecGames's Forum Posts

  • Thank you for clearing that up for me and anyone who will be visiting this thread! I know that native Windows applications treat the triggers as an axis, left being the negative part, right being the positive. Only axes can be analogue there, and buttons can be only digital. I think that would be counter-intuitive for most users. In my opinion, Construct 2 is not such an advanced tool to support that kind of stuff. It is more of a tool for those who want to begin game development, or is a prototyping tool. Still, you can do a lot of amazing things, but it has its limitations. I love it because it is so easy to use.

    PS: The axes being buttons could have a use if the button would return anything except 0. But after all, a missing feature is better than 5 broken ones. I've already found a way to avoid the problem.

  • I think you understood the exact opposite. It works outside the trigger, but not inside.

    EDIT: Just to clarify, it works in both cases, but outputs values when it shouldn't if inside the trigger.

  • Problem Description

    The "LastButton" on a gamepad returns a button press after an axis has been moved in the positive direction, when using both "Every Tick" and "On Any Button Pressed" or when using only "On Any Button Pressed", but not when using "Every Tick" only.

    Attach a Capx

    http://www.mediafire.com/download/ta5xvu8i9ndv9l9/gamepadError.capx

    Description of Capx

    It prints out the method(s) it is using to detect button presses, the last button pressed, its value and its raw value.

    Steps to Reproduce Bug

    • Add Gamepad object
    • Add Text object
    • Add "On gamepad any button pressed" event
    • Set text object's text "Gamepad.LastButton"
    • Run the project
    • Test with a few buttons
    • Push any analogue stick right or down
    • Test with a few buttons again

    Observed Result

    When moving an analogue stick down or right (along an axis in the positive direction), it returns a value from 16 (when moving along axis 0) to 19 (when moving along axis 3) iff using "On any button pressed". The button's value is always 0.

    Expected Result

    Not changing the returned value, as it is supposed to report only button presses, not axis movements.

    Suspected cause

    Construct 2's use of a gamepad API, or a bug in the API itself.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: NOT SUPPORTED

    Operating System and Service Pack

    Windows 7 Home Premium SP1

    Used hardware

    Xbox 360 Controller (XInput STANDARD INPUT)

    (literal ID)

    Construct 2 Version ID

    r178 64-bit free edition

    (first noticed in r173, I did not own a gamepad before that)

  • RecGames nothing to be ashamed about in my opinion... not many of the features of Tiled are supported in C2 currently, and I'm sure someone will inevitably come along with this same question and probably find the answer here. Looking forward to seeing what you're working on, looks interesting.

    Take a look at this (made in Game Maker, source and resources up for download):

    http://remar.se/daniel/iji.php

    One of my favorite games. The graphics are from there.

    EDIT: When asking questions, always read the manual!

  • From manual:

    [quote:1k69b4qv]

    Collisions

    When testing for collisions with a Tilemap object, empty (erased) tiles count as not colliding, and all other tiles count as colliding. A custom collision polygon can be set for individual tiles by clicking the Edit tile collision polygon button in the Tilemap bar, or just double-clicking the tile in the Tilemap bar. Note however the collision polygon cannot be entirely removed from a tile: only an erased tile counts as not colliding at all.

    If you wish to have tiles that are visible but do not register a collision, use two Tilemap objects layered on top of each other. Test for collisions with just the top object, and erase any tiles that should not register a collision. These tiles can then be placed on the tilemap object beneath, so they appear in the same place but are not tested for collisions.

    Must've missed that.

  • Thank you very much on both aspects. I knew there was something I had to add to the random part and I just couldn't remember.

    It is very important to remember what kind of output you get and convert appropriately. I hope you know what int(), string() and float() do and how to use them. I've failed many times because I didn't know random returns a float. Good luck in your project!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a simple solution, if anyone has a different one, please post! I have the main tilemap, non-solid, the solid one and a "solids" variable that looks like this: "0,1,2,5,6,128,234,456" and contains the ids of solid tiles. At start, it loops through all tiles on the non-solid tilemap and compares them to the variable. If a tile matches, it is set in the same position on the solid tilemap and removed from the old one.

  • The problem is that random(1,3) is almost always greater than 1 and never smaller than 1.

    Random returns a float between either 0 and a-1, if you use

    random(a)[/code:3dxdpj8i] or a and b if [code:3dxdpj8i]random(a,b)[/code:3dxdpj8i] This means that it can return 1.024566 or 2.478962. You could set wep to [code:3dxdpj8i]floor(random(3)+1)[/code:3dxdpj8i] and comparing if it is 1. That way it has an equal chance to return 1.564585, 2.024566 or 3.478962, which will round down to the nearest integer (1, 2 and 3, respectively). I recommend [code:3dxdpj8i]choose(1,0,0)[/code:3dxdpj8i] which will randomly choose between those three, so 1 has a 1/3 chance, and the two 0's have a total chance of 2/3.
    
    Distance can be replaced by [code:3dxdpj8i]abs(player.x-testenemy.x)[/code:3dxdpj8i]
  • I have a tileset with tiles with full collision (block) and partial (slope),but I need some not to collide at all. I want that so I can make the tilemap solid and act as the level platform. If that is not possible, I'd like to know whether there is a way to make only certain tiles be solid following the collision polygon. Is this doable, or do I need two tilemap objects, one for colliding solids and one for non-colliding scenery?

    Thanks in advance!

  • I read all the XPath instructions, but still do not get how it works!

    Could you please help me with the following:

    http://www.mediafire.com/download/xr2njk32h79w3cv/weather.capx

    EDIT: Fixed the behaviour that may have been stopping you from opening.

  • Try a for loop from 0 to 8 and set the layer number to loopindex.

  • To remove the freezing try this:

    http://imgur.com/0ODGvtV

  • Try replacing the first "On any touch start" with "Is in touch".

  • I have made a short survey about the use of ad blockers. If it gets enough responses, I will use it in a school project.

    <font size="6">Here is the survey</font>

    If you take part, I would like to thank you very much.

  • Welcome to the forums! I do not speak arabic, and I am not sure how many users do. Most of us speak english, but that doesn't stop anyone from welcoming you!