immortalx's Forum Posts

  • It's funny because I told my son (who wants to be a programmer) the other day, that many games I used to play some 25 years ago, were written in assembly. I showed him a listing cause he wouldn't believe me and he laughed so hard

    Be thankful that software like Construct 2 exists and you can move things in a screen with so little effort!

    The "No programming required" part is indeed a bit misleading. It's still programming, but in a visual and effortless way.

    A good practice is to initially focus on the logic part of the engine and use generic assets as placeholders. You will eventually "make things work" and then you can move on with the art part.

  • I asked about the same thing a couple of days ago. You can do that by using the canvas plugin, by positioning your sprite into the canvas and then using the plugin's "paste object" function. If you want to capture the entire window then resize your canvas to the window's size.

    You then use the expression alphaAt(x,y) to get the alpha value of a pixel.

  • Shadowblitz16

    I feel terribly sorry for not understanding what you mean (English is not my native language).

    Can you post a capx just to make sure we both talk about the same thing?

  • If I understand what you mean, what you ask is already there:

    This will pick all instances that meet both the first AND second condition.

    This will pick all instances that meet either the first OR the second condition.

    Right click and select "Make Or block"

  • If I understand right, you made a custom sliderbar that slides together with a default sliderbar, right?

    In my example above there's no need for a default sliderbar, you just put your custom graphics and that's it. Were you able to download the capx?

  • Maybe you mean a toggle button? Like press it once ->ON, press it a second time ->OFF?

    Create an instance variable on the button (select type:Boolean and let's call it "state")

    On the "On clicked" event of the button add an action: Button toggle state

    This value will switch from 0 to 1 every time you press the button.

  • Ashley

    Thanks a lot for the detailed reply! I truly understand now how difficult it is to support this feature. As an alternative, I have the option to display a list to select the sprites from and it seems that's the way I'm going to. Thanks again for your valuable time!

  • Try:

    Button On clicked-->Set silent

    or

    Button On clicked-->Set master volume to (enter a value about -40 db or so)

  • LittleStain

    I'm doing an application where several images are loaded in runtime and then put into animation frames of a single sprite.

    I then create instances of that sprite and set each one into a different animation frame. (Thus, i have a bunch of images on the canvas)

    Now, the collision polygon of each of these instances is its bounding box (can't change that on runtime).

    All I want to do, is when I click on one of them (on a transparent area), ignore the click, check if there's another sprite instance under the mouse pointer, and fire a click event on that one instead.

    Thanks for bringing into attention the canvas plugin. I'll give it a go!

    EDIT: Maybe this is a good place for a request. Ashley, how difficult would be to implement a feature (both in the editor and on runtime), where mouse events ignore completely transparent pixels on a sprite?

  • As far as I know there's no built-in way in C2 to determine whether a user has clicked on a transparent area of a sprite.

    Is there a chance to insert a Browser.Exec.JS on the "On object clicked" event and capture the transparency value into a variable?

    I'm thinking I can then trigger the action I want only if the value in the variable is <255.

  • I'm making an application in which I need to order a sprite list in a kind of visual way, so I came up with this:

    https://dl.dropboxusercontent.com/u/14855413/snaplist.capx

    It's probably not the best way to do this thing but I hope someone will find it useful.

    The array is there just to fill the text boxes and doesn't get updated. I'm thinking I can just do a string search to retrieve the values anytime.

    Also, ignore the scrolling part, it's there as a working example.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I did and ended up with an error message:

    [Fiddler] The socket connection to dl.dropboxusercontent.com failed.

    ErrorCode: 10060.

    A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 108.160.173.133:80

    Try this (replacing ** with tt)

    h**ps://dl.dropboxusercontent.com/u/14855413/ex.capx

  • I can't see the image too.

    If I understand right you have many conditions in a single event like this for example:

    Mouse cursor is over Sprite

    is animation "run" Playing

    Sprite2 Y < 150

    If that's the case, then the first time you use these conditions together, add an action that sets a global variable. Like MyConditions=1

    Then you can use a single condition:

    System - MyConditions=1 --> ...(trigger some actions)

    At the end of the actions set the variable back to zero.

  • Herald of Time

    Just copy-paste the link on the browser.

    (I don't have enough rep to post "clickable" links)

  • Ah, now I get it. You can't just put the X value as the volume though. You have to convert it first

    I did an example

    https://dl.dropboxusercontent.com/u/14855413/volumeslider.capx

    There's probably a better formula, but basically what it does is to translate the X position of the slider sprite to db.

    Substitute 525 to the maximum X your slider sprite can travel and 250 to the difference between max X and min X.

    -50 is the volume at which I hear no sound. Put it to a lower value if you still hear some sound (I'm 41 so I already started having hearing difficulty )