labithiotis's Forum Posts

  • Can i create a sprite object at runtime that's unique ? Seems like such a simple thing :(

  • Kinda, just need a system to move all containers and using a single object for reference of x y so I can limit the movement of all containers.

    Also I have had to revert your plugin update as its crashing when I remove container and all instances

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Also is it possible to "Pin" the object to another, so if I have 3 containers and pinned them to board and move that(board y), is that possible as I can't get that to work, also/or is it possible to add containers to containers so if you had a container called board and containers attached to that called enemies with several sprites/texts objects.

  • Yep that's working perfectly now with adding elements but i think there's a bug with destroying containers. See attached capx

    https://dl.dropboxusercontent.com/u/85804468/Container%20Bug.capx

  • just tried to use it but no luck, it has a PASTE action so I tried making a sprite with url and then pasting but it didn't work, it might be because i am using REX's Container plugin and canvas plugin isn't compatible.

    Would be ace if it had a direct URL image load for the canvas plugin, also i see that it currently doesn't compile with latest google closure (minify)

  • Link to .capx file (required!):

    dl.dropboxusercontent.com/u/85804468/c2/ExampleURLImage.capx

    Steps to reproduce:

    1. use sprite pluging

    2. load a image from url

    3. make another sprite

    4. load a different image

    Observed result:

    the image is made the same for all because it uses same object and thus same frame

    Expected result:

    can we have an option to make the urlimage loaded unique (using it fro user profile pictures)

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    windows

    Construct 2 version:

    127

  • Hi all,

    I have a problem that I am using a sprite for user pictures and load a url from server, but for each instance it uses the same frame which is changed by the "load image from" action so all images are the same.

    I have tried load URL plugin but i can't change the size or position of the instance which isn't ideal.

    I tried to get SpriteURL but auth has removed it :(

    any ideas?

  • Hi, does this allow different images for each instance as the the official just replaces current frame which alters all the instances.

  • I have a bug that when you create and add instances to containers the container that's picked by (Touch or Mouse event)is wrong and thus the instances is attached to the wrong instance.

    I have made a Capx to show you an example.

    https://dl.dropboxusercontent.com/u/2175584/Construct2Examples/Container%20Bug.capx

    Select the container to attach a "Yellow" box and the select them again to remove it, you can also use wheel mouse to more them up/down. After selecting them for a while you should notice that the one you select isn't he one that has the yellow box attached too or the coordinates are wrong.

  • I've tweaked it further because of an issue with additional appends.

    <img src="https://dl.dropboxusercontent.com/u/2175584/Construct2Examples/Append.JPG" border="0" />

  • I want the keys to extend, in that example only D was added becuase it was new.

    I have done it by hacking the json data like so:

    Ajax on "Complete" | DataLoaded | Load hash from JSON string Ajax.LastData
    
    var text appendData = ""
    
    System : dataLoaded.itemcnt("") > 0 
    
      System for "" from 0 to DataLoaded.ItemCnt("")-1 | Add DataLoaded.at (str(loopindex) to appendData
    
           System append =! "" && loopindex < dataLoaded.itemCnt("")-1 | Add "," to appendOrders
    
      System DataAll.itemCnt("") = 0 | System : set appendData to "[" & appendData & "]"
    
                                     | dataAll Load hash table from JSON string appendData
    
    

    I want to do this :

    Table A (Loaded) : [ 1:"A", 2:"B" ]

    Table B (All) : [ 1:"X", 2:"Y" ]

    Result after merging/appending A with B : [ 1:"A", 2:"B", 3:"X", 4:"Y"]

    with the current merge that result is : [ 1:"X", 2:"Y" ] has it has merge the indexes.

    Note- the root is blank from my server and I can't change that:

    [
     {
       "ID": 129,   
       "X": X
     },
     {
       "ID": 130,   
       "X": X
     },
     {
       "ID": 131,   
       "X": X
     }
    ]
  • How can I append a hash table. I have two tables one that has the loaded ajax call and another that's the stored table. As I want to check the server every few mins for updates and push them into the stored table.

    I have tried to use the merge but that's not giving me the correct results as it overwrites current keys rather than appending them.

    Also tried to use set value and ussing itemkeycount to get last root key and set value from loaded hash table but I get \ in the json.

  • easeTween without doubt is the most used plugin i use.

  • Hey all,

    Is there a chat channel, even after searching forums i can't find any details for a channel.

  • I have tried to make a plugin with Jquery but not making much progress. I have the following if anyone can help that would be awesome.

    https://dl.dropboxusercontent.com/u/85804468/jajax.zip

         

    instanceProto.doRequest = function (tag_, url_, method_, data_, headerkey_, headervalue_)
         {
    // Create a context object with the tag name and a reference back to this
              var self = this;
              var requestAjax;
              
              var errorFunc = function () {
                        self.curTag = tag_;
                        self.runtime.trigger(cr.plugins_.JAJAX.prototype.cnds.OnError, self);
                   };
              
              try {
                   if ( method_ === "POST" && data_ ) {
                    requestAjax = $.AJAX({
                                  beforeSend: function(xhr){
                                            xhr.setRequestHeader('auth', 'hash');
                                            xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                                            xhr.setRequestHeader("Content-Length", data_.length);
                                       },
                                  type: method_,
                                  url: url_,
                                  data: data_ ,
                            contentType: 'application/x-www-form-urlencoded',
    
                            success: function (data) {
                                            self.HeaderResponce = xhr.getResponseHeader( headerkey_ );
                                    self.lastData = data.replace(/\r\n/g, "\n");
                                            self.runtime.trigger(cr.plugins_.JAJAX.prototype.cnds.OnComplete, self);
                                       },
                                  error: function() {
                                            errorFunc();
                                       }
                                       
                             });     
                        }
                   if ( method_ === "GET" ) {
                    requestAjax = $.AJAX({
                                  beforeSend: function(xhr){
                                            xhr.setRequestHeader('auth', 'hash');
                                            xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                                            xhr.setRequestHeader("Content-Length", data_.length);
                                            xhr.setRequestHeader(headerkey_, headervalue_);
                                       },
                                  type: method_,
                                  url: url_,
                                  success: function (data) {
                                            self.HeaderResponce = xhr.getResponseHeader( headerkey_ );
                                            self.lastData = data.replace(/\r\n/g, "\n");
                                            self.runtime.trigger(cr.plugins_.JAJAX.prototype.cnds.OnComplete, self);
                                       },
                                  error: function() {
                                            errorFunc();
                                       }
                                       
                             });     
                        }
                   if ( method_ === "PUT" ) {
                    requestAjax = $.AJAX({
                                  beforeSend: function(xhr){
                                            xhr.setRequestHeader('auth', 'hash');
                                            xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                                            xhr.setRequestHeader("Content-Length", data_.length);
                                            xhr.setRequestHeader(headerkey_, headervalue_);
                                       },
                                  type: method_,
                                  url: url_,
                                  success: function (data) {
                                            self.HeaderResponce = xhr.getResponseHeader( headerkey_ );
                                            self.lastData = data.replace(/\r\n/g, "\n");
                                            self.runtime.trigger(cr.plugins_.JAJAX.prototype.cnds.OnComplete, self);
                                       },
                                  error: function() {
                                            errorFunc();
                                       }
                                       
                             });     
                        }
                   }