JohnJ's Forum Posts

  • it's not slow in my browser.

    But I can't destroy no one of big ships... I did not like what I have to constantly press and press Ctrl on each shot. I want to press and hold the key to weapons firing. If the bullets for the weapons are infinite, then it is better not ask to press a button - even shoot at all times.

    It is bad that there was not a rocket ...

    I liked the "eat" a UFO when I took them to ram - there were no explosions, and my life have come far in the negative.

  • Competition is good. But what it means 'Reclamation'? I see in translator and it give me a many variants of translation it word. Can you tell me about it and show examples of this type of games.

  • jumprock, ok, I see now. And for what you pin one Sprite2 to another Sprite2? Any control or change params will be work for both... Make different types?

    Or you can create an example, share it and tell which result do you want.

  • Add Pin behavior to my_sprite(1), go to Events sheet and set action for my_sprite(1) "pin to object" and select my_sprite(2).

    <img src="http://dl.dropbox.com/u/50581036/27.11.png" border="0" />

  • Show a screenshot of the error, please. Has anyone else had this problem?

    P.S. it is behavior, not plugin...

  • Set a "mouse click on object" event with action Object.ignoring_input

    See example.

  • I want to put the HTML5 game on dropbox, but about my *.html files says, that it was not found.

    I did everything according to a lesson from Ashley, but it does not work.

    Here's an example:

    index.html and test.txt located in the same folder Public / Test on the dropbox server.

    Public links:

    dl.dropbox.com/u/50581036/Test/test.txt - that's ok

    dl.dropbox.com/u/50581036/Test/index.html - error 404

    What am I doing wrong?

  • Hi! I finished testing the following plug-in. This time it's only a modified Pin.

    Added:

    1. type: pin by angle, pin by distance and pin by distance&angle.

    2. destroy together: destroy pinned object when destroying a behavior instance.

    I used it to create a behavior for meteorites and other bodies, which revolve around its axis and moving in a straight line. Maybe it could have been done differently, but I could not come up as ... The default behavior is not allowed to repeat Pin this effect, since the angle is also changed following the pinned object.

    So:

    1. Create a sprite of meteorite (for example) with Rotate behavior.

    2. Create a hidden sprite with Bullet behavior.

    3. Add to meteorite a jj_pinEx behavior and set type "by Distance" and in eventsheet set the hidden sprite as a pinned object of your meteorite.

    Installing: unpack folder from jj_pinEx.zip to the behaviors directory of your C2 html5 exporters.

  • Ok. Now I has finished testing my second plugin-behavior. WEAPON! (about my first plugin-behavior you can read a funny message)

    It make from your object a "real" weapon. You can add some same behaviors with different params for imitation more then one weapons on the object!

    The object with this behavior have a clip for bullets and bullets in stock.

    You must set the bullet name from your project by setting it from Events sheet by the "Set bullet instance" action.

        *** Properties ([Name] = [default_value] ([comment])):

            * Clip size = -1 (unlimited)

            * Bullets in clip = -1 (unlimited)

            * Bullets in stock = -1 (unlimited)

            * Stock size = -1 (unlimited)

            * Shoot interval = 100 (ms)

            * Reload time = 1000 (ms)

            * Auto-reload = "Yes" ("No")

            * User control = "Burst" ("Single", "None")

            * Enabled = "Yes" ("No")

            * Shoot key = "" (for example: "32" or "spacebar")

            * Reload key = "" (for example: "r" or "R")

            * Weapon image-point = "0" (image-point index of sprite)

    Actions, Conditions and Expressions you can see in C2 or in source of plugin :)

    Installing: unpack folder from jj_weapon.zip to the behaviors directory of your C2 html5 exporters.

    I'm new to C2, so please report bugs and write their suggestions on improving the capacity plug-in or upgrade code.

    Maybe it would be better to insert a dropdown for keycode, instead of a text? But then it will be long ...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • why only chrome? I use only Opera & Firefox...

  • nice idea! ok, and how do you want to save pictures? svg?

  • In my opinion that is a microbug of C2...

  • I need destroy some object when destroying my...

    I use next code for it:

    behinstProto.onDestroy = function() {
        if (this.destroyObject) {
            this.runtime.DestroyInstance(this.destroyObject);
        }
    };

    but it does not work, and why:

    runtimeProto.DestroyInstance = function (inst)
         {
              // Add to death row to destroy later
              this.deathRow.add(inst);
         };

    object is added to all the destruction, but it happens here:

    runtimeProto.ClearDeathRow = function ()
         {
                    .....
              var arr = this.deathRow.valuesRef();     // get array of items from set
    
              for (i = 0, leni = arr.length; i < leni; i++)
              {
                            ...
    
                   // Remove from all behavior-plugin's instances
                   if (inst.behavior_insts)
                   {
                        for (j = 0, lenj = inst.behavior_insts.length; j < lenj; j++)
                        {
                             binst = inst.behavior_insts[j];
                             
                             if (binst.onDestroy)
                                  binst.onDestroy();   ///// THIS!!!!!!!!!!
                                  
                             binst.behavior.my_instances.remove(inst);
                        }
                   }
    
                            ...
    
                   if (inst.onDestroy)
                        inst.onDestroy();  /// OR THIS!!!!!!
                        
                   this.objectcount--;
                 }
                    ...
    

    arr - is array of old list of destroying instances, new added instance located in this.deathRow at now!

    After arr-loop ("for") we have next code:

    if (!this.deathRow.isEmpty())
                   this.redraw = true;
    
              this.deathRow.clear(); // THIS!!!!!!
         };

    A new instances in list was cleared with old together...

    Ok... How I can destroy any instance on destroing my?

  • Some hint you can read in Construct 2, when click on property "Drift recover", read in bottom left corner short description of selected property.

  • try to use this plugin

    or see it as example...