Magistross's Forum Posts

  • I edited my message and added a possible for way to deal with multiple lines of text at once. If you need help with arrays I'll be happy to oblige.

  • I know you are asking for help but I can't resist and shamelessly plug my Dialogue system template. You can fiddle with it on the demo page. Here's a short dialogue example that you can load with it.

    As for your problem, I guess you could always "stack" the lines of dialogue in an array and pop them one at a time when the DestText.Text = DIALOGUE_PLACEHOLDER (Line fully shown).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For my curiosity, could you tell us what were those actions?

  • Functions order in the event sheet is irrelevant, as they are pure trigger. As sqiddster said, a function call is executed and "end" even before the next action in the same event. Unless you have any wait call in the function or just before, it shouldn't run in the frame "after".

  • After a bit of testing I stumbled upon a rare occurrence of a "bug" that leads to some cells getting wrongly "typed" (a "Corner" getting labeled as "FakeWallSpot", for instance). The problem comes from the "cleaning" part where lone obstacle "cell" get removed. It's a bummer, but the only way to ensure that the bug never happen is to do the cell "typing" in a separate "For each XY" on the cleaned array, thus increasing the generation algorithm run time.

  • Oops, I've added a condition in your previous capx and forgot to tell you about it. In event 20, be sure to restrict function calls to empty cells. So add a "Cave : Value at cave.CurX, cave.CurY = 1" before the "Pick CellTypePos..." and everything should be good.

  • I finally got to take a look at it. It seems I botched the GetCellType function, had a second look at it and I had the value representing an empty and filled cell mixed up. Just adjust the value for "FakeWallSpot" to =1 and "Wall" to =3.

  • It seems that I require the "ParticlesWH" plugin from Scirra... However, I have no idea what that is...

  • The coordinates in the array are actually "tile" coordinates, so to get the real X/Y on the layout, you have to multiply them by the correct tile width/height.

    On line 22 of your previous picture, you are calling the the "GetCellType" function with no parameter, so it's constantly checking the type of tile 0,0. However I don't why you are checking for a "FakeWallSpot" while we already have all possibile position... On line 23, before looking inside a CellTypePos array, you have to limit the SOL to the correct array (the one with CellTypePos.cellType = "FakeWallSpot"), you can use pick by evaluate or compare instance variable for this. Here's a screenshot of how I'd do it all. I supposed your tiles were of size 32x32.

    Enemy generation should be done after the world generation, I can't really see if that's the case currently, so I'm telling you just in case.

  • What you basically have to do is get a random integer between 0 and array's width - 1, retrieve the info at that index (Array.At(randomInt, 0) for x coord and Array.At(randomInt, 1) for y). Once you have the coordinates, you delete that index from the array. (Delete index randomInt from X axis)

    Hope this helps.

  • Show me how you did the position picking/popping part, I'll tell you if something isn't right.

    And concerning that highlighted event, it should be exactly the same as the one above, but change the "cave" array instead of the "clean copy" array.

    So we have : cave -> Set value at (cave.CurX, cave.CurY) to 1

  • I remember having used the name() function successfully, but I can't seem to be able to get it to work now... Maybe a bug ?

    edit: Okay, I think I know why I can't get it to work anymore. I'm currently using Firefox for my test, and there's a workaround for some Firefox related problem implemented in the XML plugin. Strangely, the workaround isn't needed when using the name() function. Testing with IE fails too, although I don't know why... Chrome and NW.js works like a charm!

  • You might be interested in this plugin :

  • Access-Control-Allow-Origin is a response header, it's the server that allows it or not. You can't as a mere client tell the server to allow for cross-domain request, that would entirely defeats the purpose of cross-domain policy.

    The only solution is to have access to server configuration, and add that custom header there.

  • Sure, here it is.

    https://dl.dropboxusercontent.com/u/700 ... adXML.capx

    As an exemple, I displayed the first <word> node of the first <word> node. Strange document structure by the way, but I guess it's out of your control... <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">