blackhornet's Forum Posts

  • Here is the randomization fixed.

    You'll need the RandomArray plugin.

    Briefly, set the Random array size to the number of frames. I've set it to 10, as two of your last frames a duplicates, and it's clearer to see there are no duplicate frames when there aren't any to begin with.

    On your timer event, rescramble the array, and copy this to a normal Array. Cycle through every active monster to find it's frame number in the Array and remove it. You then have an Array of frame numbers that are unique to this cycle.

    In the selection event, set the frame to the first one in the array and then delete that same entry so that the Array is again unique for the next monster in this cycle.

    The other change was to add an Active flag, to know which sprites are active and should be checked for duplicates, ignoring all others.

  • Just reduce your range in half and multiple the result by two.

  • Edit:

    Function.Call("getit", XSquare.UID)

  • I'm mapping data to layers. I'm doing a step-sequencer where different instruments are on different layers. The data is stored by index, so Voice0, Voice1, etc. I am hoping to support a standard input format with this format. When I load the data in, I load from the top layer, which I know the name of, and wanted to address subsequent layers relative to that one layer.

    Obviously there are many ways to do this, but the most instinctive one was to only need to know the Name of that top layer, ask for it's number (as it may change as I develop the game), and then add the data layer by layer relative to that first layer.

    I'm not saying there are many ways to work around this, but the most obvious one was to just know about that first Name, and then address everything relative to the layers Number. Retrieving the layers number at runtime seems the obvious choice,

  • Ashley

    I was about to ask for the same expression. My use case is I have multiple layers that I need to insert sprites by relative layer order, at runtime. My first inclination was to use "the" expression to convert the top layer name to it's number and then I can reference the lower layers by a relative index. There was no expression though, so I have to keep track of the top layer number and remember to change it as I add layers below the layer range I need to address relatively.

    Seems like it should be a trivial expression to add. Thanks.

  • Replace 'Bullet is on screen' with 'Bullet.Count = 0'.

    (Destroy the initial bullet).

  • For loop:

  • Use ELSE.

  • You shouldn't start another thread for the same issue. The first one had the sample on it which is necessary to debug this. You need to keep track of your current arrow. Make a Global variable and set it when you spawn the arrow. Then 'Pick by UID' in the 'On touch end' to pick just that one arrow. The default is to pick all.

    You could also give the bow an instance variable instead, if there are multiple bows possible.

  • Use Function.Param(0), Function.Param(1), etc. I tend to pop all params into local variable on the first action to get them named.

  • It requires a re-export to fix though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add an instance variable that tracks if it has ever hit. If not, set it and count it, else don't.

  • No. The arcade is down until it gets revamped.

  • Plugins can also end up in your AppData directory. Try browsing to %appdata%\Construct2\plugins in File-Explorer.

  • You are stopping by Tag but didn't specify a Tag. Either give the sound a Tag, or leave the Stop blank.