R0J0hound's Recent Forum Activity

  • No, but from the best I can tell:

    solModifiers is the current selected object list state, or something to that effect. Basically what's picked.

    pushCopySol() Saves the current sol to a stack.

    popSol() Restores what was saved from a stack.

    More details about it can be found be poking around the source.

  • The most info you can find is from the manual:

    https://www.scirra.com/manual/26/runtime

    The function basically grabs the current position in the event sheet and runs the subevents from there multiple times. Once for each dictionary key.

  • Well you can't really disable it. The most you can do is change the "runtime" property (below the eye distance property) from direct-X9 to application. But then the game will have no graphics at all.

    Also if the server has a display then it has a graphics card. It sounds more like you need to install directx or something.

  • How does the eye distance have anything to do with the crash? Did it start crashing after setting it to 0? Eye distance is mainly for 3d objects and objects with ZElevation. Why do you want to disable it? If it's perspective you want to disable you can do it with the system action "set projection mode".

  • It's needed in that case since the rotation is being done manually. "Rotate" is not part of the behavior.

  • If you want to create a gradient at runtime you can use the canvas plugin for that.

  • There are a few ways.

    One is to give the the object the bullet behavior and add an event like this:

    Every tick

    --- sprite: rotate 10*dt degrees toward -90

    Where 10 is the turning speed in degrees per second and -90 is the end angle.

    Another way that is useful from a trigger is to add a instance variable "turningSpeed" to the sprite to tell how fast it turns.

    Every tick

    --- sprite: rotate clockwise self.turningSpeed*dt

    start of layout

    --- sprite: set turning speed to -90

    --- wait 1.0 seconds

    --- sprite: set turning speed to 0

    --- sprite: set angle to -90

  • Not with the canvas plugin, it wasn't designed for it. It can be done if you wish to delve into the plugin sdk.

    With webgl off html5 canvases are as easy to draw as any other image so the main thing you'd need to change in a plugin is the draw() function to basically this:

    instanceProto.draw = function(ctx)
    {
    ctx.save();
    ctx.rotate(this.angle);
    ctx.drawImage(document.getElementById("myCanvas"),
    		0 - (this.hotspotX * this.width),
    		0 - (this.hotspotY * this.height),
    		this.width,
    		this.height);
    ctx.restore();
    };
    [/code:34paskcx]
    Where "myCanvas" is the id of the canvas you want to draw in C2.  It has to exist somewhere on the webpage.
    
    Making it work with webgl "on" requires converting the canvas to a webgl texture every time and that's not exactly a fast operation.  You can reference my canvas plugin to see one way to do it.
  • Sargas

    It is picked by default in sub-events, hence event 19 is working with the new object. It's the "pick all" that won't be able to pick it since the new objects aren't in the object list yet.

    This topic explains the reason:

  • Newly created objects can't be picked until the next top level event. So the object you just spawned is not picked in event 18 by the "pick all" condition. The new object is picked right after creation though, so you could do something like this:

    16|Block : on detroyed            | System: set blockY2 to Block.y1
      |System: move=0                 | System: set blockX2 to Block.x1
      |                               | System: set Move to 1
      +-------------------------------+
       17|System : for each block     | Spawner: Spawn Block on layer 2 (image point 0)
         |Spawner: Position=block.x1  | Block  : Set x1 to Spawner.Position
         |System : move=1             |
         +----------------------------+
          18|System: Pick all block   | Block : Add 1 to y1
            |Block : y1<blockY2       |
            |Block : x1<blockX2       |
            +-------------------------+
          19|Block : y1<blockY2       | Block : Add 1 to y1
            |Block : x1<blockX2       | System: set Move to 0
            +-------------------------+
    [/code:32dhaeow]
    You can simplify it further. The "move" variable events can be removed since it starts and ends as 0. Also the "for each" can be removed since "on destroyed" is run once for each destroyed object.
    [code:32dhaeow]
    16|Block : on detroyed            | System: set blockY2 to Block.y1
      |                               | System: set blockX2 to Block.x1
      +-------------------------------+
       17|Spawner: Position=block.x1  | Spawner: Spawn Block on layer 2 (image point 0)
         |                            | Block  : Set x1 to Spawner.Position
         +----------------------------+
          18|System: Pick all block   | Block : Add 1 to y1
            |Block : y1<blockY2       |
            |Block : x1<blockX2       |
            +-------------------------+
          19|Block : y1<blockY2       | Block : Add 1 to y1
            |Block : x1<blockX2       |
            +-------------------------+
    [/code:32dhaeow]
    
    One final observation, since you create a block for each destroyed block couldn't you instead just move the block instead of destroying it?
  • Sir, that is quite the run on sentence.

    So basically you have a ball on a box. When the box is clicked it's destroyed and the ball falls. The ball then hits a slope, bounces and then hits a triangle.

    At least that's the desired effect. So you're saying that when the ball hits the slope it gets destroyed instead of bounces? Again as stated in previous posts it's near impossible to guess what's wrong without seeing a capx. Making a copy of it and removing everything you don't want to share is one option.

    A few points though.

    * You said you gave the ball the physics behavior and then the bullet behavior do you can tell it to bounce. A rule of thumb is to not use other behaviors with the physics behavior, otherwise they'll clash. Furthermore the physics behavior should handle the bouncing automatically. The only parameter you have to control the amount of bounce is the elasticity of the ball and slope. After that motion should follow a realistic path.

    * Unless you have an event to destroy the ball I don't think it's being destroyed. Rather I'd say it's flying off screen at a high rate of speed. Just a guess though.

  • Try Construct 3

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

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

    Sure, feel free to hit me up on skype.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound