R0J0hound's Recent Forum Activity

  • In general if you have an array with sizes: sizeX, sizeY and sizeZ,

    and X,Y and Z are the current positions,

    then here is the general formula:

    X+sizeX*(Y-1)+sizeX*sizeY*(Z-1)

    or if written in construct:

    @(Array.CurrentX + Array.SizeX*(Array.CurrentY - 1) + Array.SizeX*Array.SizeY*(Array.CurrentZ - 1))[/code:exdklix3]
    and if it's just a 2d array:
    [code:exdklix3]@(Array.CurrentX + Array.SizeX*(Array.CurrentY - 1))[/code:exdklix3]
    
    The other formula I gave you fills the Y column before increasing X.  It was in this form:
    [i]Y+sizeY*(X-1)[/i]
  • [quote:1gnjibfz]how would you go about using that in a 2 dimensional array?

    Like this:

    + System: Start of layout
    -> Array: Set size to 3 x 2 x 1
    	+ Array: For Each element
    	-> Array: Set index (Array.CurrentX, Array.CurrentY) to {"one","two","three","four","five","six"}@((Array.CurrentX-1)*2+Array.CurrentY)
    [/code:1gnjibfz]
  • I don't think that a hash table is the right tool for the job in this case.

    Try an array:

    example

    requires 0.99.84

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been using relatively unused "at" or array access operator. It is fairly simple and requires no python.

    + System: Start of layout
    -> Array: Set size to 3 x 1 x 1
    	+ Array: For Each element
    	-> Array: Set index Array.CurrentX to {"one","two","three"}@Array.CurrentX
    [/code:1uak4www]
  • D?j? vu I think I've seen this before...

    Ah here it is:

    http://www.scirra.com/forum/viewtopic.php?f=3&t=5999&hilit=rts+path

    And I still like the solution I presented there.

  • [quote:1vf99tpj]I've found a bug here though. apparently capturing the manual control somehow makes the "Click" control I set up not register when the user actually clicks the mouse himself so I had to make a separate event for that. Posting a bug report now...

    You need to click the dropdown and select "Left mouse click". No really, that fixed it. It seems that even though "Left mouse click" is shown as the default for a new custom control, it isn't actually selected by default.

  • How did you get it to crash? Can you post a cap.

  • [quote:qmw8w9st]... how it is decided which bugs get fixed first?

    I can only speak for myself when I say: "Whichever bug I investigate and am able to fix."

    [quote:qmw8w9st]... I think ACE should work reliably before anything else.

    As an amateur bug fixer for construct I concur. Those type of bugs are of interest to me.

  • I like it! Very useful.

  • This is also doable with events:

    http://dl.dropbox.com/u/5426011/examples/append2.cap

    req 0.99.84

    + Button: On Button clicked
      + File: File "dialog.txt" exists
      -> EditBox: Load file "dialog.txt"
      + System: Always (every tick)
      -> EditBox: Append text NewLine
      -> EditBox: Append text Name.Text & " :"&NewLine&NewLine
      -> EditBox: Append text """"&Dial.Text&""""&NewLine
      -> EditBox: Save file "dialog.txt"[/code:2lq13ftb]
  • [quote:jh4a8p41]As far as I know, there's no way to link Construct python scripts together. Like, if a python variable is defined in one script, you won't be able to access it in another.

    Not so, if variable is defined in one script, it can be accessed in a second different script. Basically the state of python (defined variables, functions,... etc) remains after the script is run.

  • You need to use conditions to pick (or select) one of the duplicates, or instances. Also it's good to note that after an object is created it is automatically picked.

    One way to pick only one instance would be:

    + Sprite: Pick one at random

    -> Sprite: Set animation frame to 1

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound