How do I add external jquery in construct2

0 favourites
  • 4 posts
From the Asset Store
Add SubRip (SRT) subtitles to your videos in Construct 3
  • Hi ,

    I am working on the game for which I will require additional features. I need to parse one object from java in construct2. I need to add one external jquery for parsing that. Is it possible in construct2?

    Thanks

  • jQuery is already included in the Construct JS file. You should just be able to call functions from jQuery using the Browser > Execute JavaScript

    We use AJAX responses in JSON format and let rex_rainbows Hash plugin parse it for us.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi....Thanks....I have installed that plugin but I am not able to use it....I am loading Ajax.lastdata from URL "http://localhost:8082/SpringJsonOutput/student.json" and then I am using Load hash table from json property of plugin.....But I am not getting output in hashtable.....Is it the correct way of using it?

  • Yea, that should be correct. Here is an example from our game client:

    [attachment=0:2v17oomv][/attachment:2v17oomv]

    We parse the keys into a separate Array then loop through that array to reference each Hash bucket.

    You have to reference the Hash like this:

    Hash.At("key.arrayIndex") for multidimensional Hashes. For us, we use a loop like:

    For loopindex from 0 to keyArray.Width -1{

    Hash.At(keyArray.At(loopindex) & ".0")

    }

    in order to access the 0th slot in the array stored at each key location. Or you can dynamically increment the array index to access other array slots in each key location.

    See rex's post on his Hash plugin for more details on other implementations:

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)