Yann's Forum Posts

  • ,without knowing, did

  • yes it is possible (with a button rather than a link)

    Though I would either load another xml for the adverbs.

    Just restarting the layout and loading another xml would probably be easier for you

    If you really want to put everything in the same xml, you should at least have a structure that makes more sense.

    Like:

    <?xml version="1.0" encoding="UTF-8"?> 
    <definitions>
      <adjectives>    
        <pair>
          <noun>Beauty</noun> 
          <adjective>Beautiful</adjective> 
        </pair>    
        <pair>
          <noun>Ease</noun> 
          <adjective>Easy</adjective> 
        </pair>
        ...
      </adjectives>
      <adverbs>    
        <pair>
          <noun>Mathematics</noun> 
          <adverb>Mathematically</adverb> 
        </pair>    
        <pair>
          <noun>Practice</noun> 
          <adverb>Practically</adverb> 
        </pair>
        ...
     </adverbs>
    </definitions>[/code:272yz6b0]
  • xmlMatching.capx

    note that for simplicity you can only have 5 "question" at a time. Also, by just inverting noun and adjective in the xpath you can have the opposite exercise (match noun to adjectives)

  • I would argue that you don't necessarily need the fishing line. After all, it's usually so thin...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Smolli

    I probably won't drop support for this plugin anytime soon. But you should at least wait for people to test proof it a bit.

    As I wrote, I'm still not 100% sure about the clarity of the design. (Mostly if using the function parameters UI is a good idea or not). And I'd like the freedom to add/remove action/condition/expressions as I see fit.

    When this plugin will be referenced in the completed plugins forum, I'll insure backward compatibility (marking the thing I will want to change as deprecated) but for now, nope!

    vtrix

    Thanks

    Well, indirectly I could somehow implement some kind of dot notation using string, but it would require string parsing which would be slower. And it would looks like classes.Value(0,"Wizard.stats.hp") instead of classes.Value(0,"Wizard","stats","hp")

    So...

    Dot notation would require a very big change in how C2 editor works. Because it would have to allow uncheckable things.

    classes.Wizard.stats.hp in C2 means, for now, that your object has a behavior named Wizard which has a stats property and.... Well C2 just really can't for now.

    Also I don't think that The new AddObjectInstanceVarParam would be of any use for the JSON plugin since it's closer to the Array or Dictionary plugin. They are just data manipulation plugins, they shouldn't directly manipulate other objects.

  • If you want a circular collision of diameter 6000 centered in your layout, you don't need any sprite with solid behaviour.

    The only thing you need to do is to make sure that the distance between the ship and the center of the layout is less than 3000

    Here's how you could do it:

    circularAreaCollision.capx

  • newt

    yeah, I indeed thought about that and I think that renaming "object" to something else would generate even more confusion. I could name it "dictionary" but it would lead to confusion with the dictionary plugin. And in the end, it's an JSON object so meh. The confusion, if it happens, shouldn't last too long in the mind of someone using JSON.

    Thanks for the clarification.

  • newt

    care to explain what you mean by "the data types are kinda weird?"

    it's a direct translation of JSON's 6 basic datatypes (object, array, number, string, boolean, null)

    In the set Value action I bundle number and string together because they are the only two basic datatype you can manipulate on C2.

    rexrainbow

    Yes, but if I start implementing array functions it might make the plugin a bit too cluttered. I prefer to start with something a bit bare and see if people manage to use it well. (and if I have to make design changes it's easier )

    Also I might have to implement n00b securities like try catching attempts to access invalid path, so the exported application wouldn't crash.

    Something like

    try {
       // access some part of object that might fail with "undefined doesn't have a property called ***"
    } catch (e) {
         if (cr.in_preview()) { // don't remember the exact function
              throw e;
         }
    }[/code:16qhonvn]
  • Hi there,

    New version 1.2.2

    Now all the code and documentation is hosted on github

    You can download it here:

    JSON v .2.2 (2018-02-08)

    • ChangeLog

      v1.2.2 - 2018-02-08

      • Fix: Properly handle deprecated expressions
      • Fix: A debug function was being removed on export but still being called

      v1.2.1 - 2017-08-27

      • Fix: renamed the deprecated Length Expression to Size by mistake, which broke some old capx

      v1.2 - 2016-06-05

      • New Shared Reference system
      • Push and Pop Path Node into CurrentPath
      • Fix: Delete on array was setting the item to undefined without removing it, so Length and Size wasn't displaying the proper value
      • Fix: Delete and Clear in general (I was doing something stoopid)

      v1.1 - 2014-04-17

      • implement save/load/debugger
      • ToJson deprecated and replaced by AsJson for overall coherence
      • change the brackets syntax for a less confusing one (I hope)
      before: root["Wizard","stats","hp"]
      after: root@"Wizard","stats","hp"
      
      • change Length for Size and handle object/array return -1 for anything else
      • isEmpty condition and Clear action for array and object
      • add a CurrentValue property
      • in foreach loop reset the current path to the path given at the begining on each iteration, this way we can mess with this current path to our heart content within the loop
      • more reliable logData
    • Archive
  • Katala

    That's very weird and suspicious.

  • I don't have time to check yet nor do I have time to download the 164.2 version, but following the reference page you posted, the lateral velocity formula should be:

    currentRightNormalX = cos(car.Angle + 90)
    currentRightNormalY = sin(car.Angle + 90)
    dot = currentRightNormalX * car.Physic.VelocityX + currentRightNormalY * car.Physic.VelocityY
    lateralVelocityX = dot * currentRightNormalX
    lateralVelocityY = dot * currentRightNormalY[/code:29wqbxyj]
  • newt exactly

  • dstaggers

    Giving you advice on how to solve your problem involves at least downloading, exploring, testing and understanding the rex's two plugin you mentionned. Ashley don't have time for that and he actually gave you the best advice he could: "ask the plugins' author"

    The authors are probably the ones who know their plugins the most.

    Canvas isn't built in. You have R0j0hound's canvas plugin and rex's rex_canvasext plugin. Making a plugin is so easy when you know a bit of javascript that there's already a lot of them. If Ashley had to know them all he would go mad and see flying monkeys everywhere.... (Oh... Wait...)

    So yeah, bottom line, ask rex (he is a nice Chinese guy, he won't beat you... (too hard) ) =)

  • +On what you want
       -> System: Take snapshot of canvas
    + System: On canvas snapshot
       -> Ajax: Post "img="&CanvasSnapshot to URL "http://www.domain.com/uploadSnapshot.php" (tag "snapshot")
    + Ajax: On "snapshot" complete
       -> you can use that to display a confirmation message of some kind
    + Ajax: On "snapshot" error
       -> you can use that to display an error message of some kind
    [/code:1inyi73t]
    little part I'm not sure about is if you need to write "img"&CanvasSnapshot" or "?img&CanvasSnapshot", I'm 80% sure it's the former.