Kyatric's Recent Forum Activity

  • "Else" is pretty tricky indeed when you consider it in the field of C2.

    Programaticly it's strictly logic : did the code block before executed or not ?

    I'm wondering about a case of use:

    if, elseif, else

    So so far, else as been evoked in "simple case tests" if I may say so, where you have actualy "workarounds" in C2 by inverting conditions or "duplicating" with different comparison operators, and where it's a simple matter of if, else.

    How would the C2 "else" handle a "more complex" structure:

    Var1 = 0
    -> do this
    Else
    Var1 = 1
    -> do that
    Else
    -> do whatever
    

    I'm aware this can be achieved already and doesn't require an "else" to do.

    The interest here, though, is to make sur that if the code in the last event "else" is executed, it implicetely means that all events "linked" above did not execute/their conditions were false.

    This is something else that can be worked around but what I expect from an else is to handle such a structure for me now.

    So my question Ashley here is is the "else" currently planned to take several top levels into account, and if so how would that impact on the "picking" side ? (also are you planning the little visual links like in CC between top and "else" events, it wasn't on your screenshots and I really liked those ^^)

    I might come later with more feedback on the subject it is just indeed really tricky once you start to think about it.

    Also, since I've used C2 from the start without else, and tools have been given to workaround, it's actualy pretty hard to think about how I would use it and expect from it on usage.

  • From the how do I FAQ: Volume control on a sound played - LINK

    The logic to mute should be the same as to control the volume.

    The capx is specific to the topic mentionned, but let's hope it can help you figure out your issue.

  • It works as intended on my computer, even after moving the player.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh nice, I did not spot that.

    Glad to hear it's working well now.

  • A true capx

    Also apparently the version you posted earlier worked as intended by default actualy.

    I don't know what happened on your previous export but it seems corrected.

  • Well currently your event is not the same as the one you screenshoted.

    The event is set to run every tick

    If player.Y is < 500 AND if player.y > 500

    That's not possible, the Y position can't be in the same tick over and under a same value.

    Also why not simply use the scrollto behavior on your player ?

  • In "Move to Layer 2" replace 2 by "GUI" (caps and the quotes).

    Apparently it works.

    (with your previous capx version, remove your latest changes)

  • Send the capx rather than this tiny screenshot.

    There's no way to be able to tell what's going wrong with your setup with only this information.

  • The excel sheet is indeed a good analogy for 1D and 2D arrays.

    3D arrays are a bit trickier, as it is one dimension deeper ^^

    I must admit I rarely use 3D arrays, mostly 2Ds/1D.

    I guess this topic will join the other elements of the "Array" section in the how do I FAQ <img src="smileys/smiley1.gif" border="0" align="middle">

    EDIT: Also still in the how do I FAQ I had made this mini RPG example using leveling and arrays with full comments.

    When searching use the forum search and be sure to check the how do I FAQ.

    There are examples all over the forum/site for you to check out, but YOU have to look in the right place.

  • On drop, set the little tree sprite to be on layer GUI, it has to be on the same layer as the UI.

  • You don't connect an array with sprites or windows.

    As I said it is a memory structure, it is a non world plugin (meaning you don't see instance to it in the project like the mouse plugin for example) that contains values.

    Where those values come from and where to attribute them is up to you.

    The width/height/depth have nothing to see with the visual plan (window/layout/whatever), it is just the "size" of the array.

    An array of 5 width will contains elements from Array.at(0) to Array.at(4) (arrays index are 0 based, 5 elements have index 0, 1, 2, 3, 4)

    An array of 2 width, 3 height will have those coordinates/cells available to store/provide values :

    Array(X, Y)

    Array.at(0, 0)

    Array.at(0, 1)

    Array.at(0, 2)

    Array.at(1, 0)

    Array.at(1, 1)

    Array.at(1, 2)

    Check the 2nd part of the tutorial linked above (after the loop, the author speaks about the arrays with nice comprehensive illustrations)

    You can have several instances of the same array and you can have different object type arrays (for example, one array for your characters, one array for the NPCs, one array containing the dialogs of the game, etc...)

    Just have a look at the links and take the time to assimilate them and understand the tools provided by the array.

    It requires a bit of abstractive thinking, but once you get used to it, you're good to go.

    EDIT: Have a look at this other commented capx which show you how to create instances of a sprite and attribute its instance variables values according to the values stored in an array (and shows also a lot of picking).

Kyatric's avatar

Kyatric

Member since 18 Aug, 2010

Twitter
Kyatric has 583,405 followers

Connect with Kyatric

Trophy Case

  • 14-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • x15
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x27
    Coach One of your tutorials has over 1,000 readers
  • x10
    Educator One of your tutorials has over 10,000 readers
  • x2
    Teacher One of your tutorials has over 100,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

23/44
How to earn trophies

Blogs