Magistross's Forum Posts

  • You might want to try your luck with a CSV and string tokenization. Edit your CSV with a spreadsheet app then paste the text in a global variable or what not. Although I'm not sure of what is the characters limit of a variable, it's probably more than enough for your needs ! (unless you were serious with your "million" <img src="smileys/smiley11.gif" border="0" align="middle" />)

  • What about a line of dots ? When the distance between the player and the last dot > threshold, then add a new dot. You could actually link those dots with the method you described, although it might look weird/jagged depending on the way the player can move.

  • Actually, the % operator exists in the C2 syntax. Use the "Compare two values" from the System object, and an else statement after if need be.

    edit: ninja'ed ! <img src="smileys/smiley11.gif" border="0" align="middle" />

  • Or just use the % operator.

    Set X position to : Mouse.X - Mouse.X % gridSize

    Set Y position to : Mouse.Y - Mouse.Y % gridSize

  • Or just use the max function.

    largestValue = Max(apple, pear, banana, watermelon)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No problem, glad to help !

  • Heh, I used "Search and Replace" to replace all occurences of [" by . and all occurences of "] by an empty string. It should work when minified now. Just redownload the link from the first post.

    Please tell me how it goes ! <img src="smileys/smiley2.gif" border="0" align="middle">

  • There are probably rules to follow for the minifier to work. I just searched a little and found this. It shouldn't be too complicated for me to edit the plugin for it to work when minified.

  • That's sad, I expected it to work. I have no idea what else could be causing this error. We might need help from people more familiar with plugins...

  • Ah ! I'm at work too ! Do you speak french by any chance ? Your name has a french ring to it... I'm a native french speaker, that's what got me wondering.

  • When you export a project as a website you have the "Minify script" option activated by default.

    I must have done something which breaks the code when it gets minified. Maybe you could try exporting with the option ticked off to see if it works ?

  • So the plugin works in test mode but fails when exported ? Could it have anything to do with a minifying process of any sort ?

  • You could use an integer too to keep track of which animation is playing.

    On key pressed

       Set animation to instanceInt

       Set instanceInt to (instanceInt + 1) % 2

    A bit tidier and permits you to add a third or even more animations to your attack sequence !

  • What you want is basically jagged arraylists (and possibly jagged arraylists of arraylists). Unfortunately, I don't think C2 can do that for now. BUT ! You can emulate them with the dictionnary and by using clever naming for your keys. Something like "Market1-Item3-SubCat2-SellValue" or "Market5-Material4-SubCat2-BuyValue" for examples.

  • Use an instance variable to store their speed, every tick, add a fixed value to that speed (acceleration). Then move the platforms according to their current speed.

    Or use the custom movement behavior, it can do exactly what you want rather easily.