R0J0hound's Recent Forum Activity

  • If my variable1 is 1 then the following conditions, actions and sub-events won't run.

  • Cool. Do you do any keyframe blending or is it just straight keyframes? Thought about adding rotation?

  • Here's an example that can get you most of the way there. You'll probably need to position the object overhead before pinning though.

  • Keeping track of what waypoint the car is on is a way to give a very rough estimate of the rank. You can get a finer rank by also considering the perpendicular distance to the next waypoint.

    So the event needed would basically look like this:

    For each car ordered by waypoint*1000-perpDistToWaypoint decending

    --- loopindex+1 is the rank.

    If the distance between checkpoints can be more than 1000 change it to some higher value.

    Ex.

    https://www.dropbox.com/s/y3xhf4wp2t6kh ... .capx?dl=1

    /examples26/laps.capx

    The perpendicular distance is the dot product between the waypoint line and the vector from the waypoint to the player. It can actually give us negative distances so we'll put it in a abs() so it's always positive.

    Player = {x, y}

    waypoint_to_player = {x-way.x, y-way.y}

    waypoint_line = {cos(waypoint.angle), sin(waypoint.angle)}

    perp_dist =abs( waypoint_to_player dot waypoint_line )=abs( {x-way.x, y-way.y} dot {cos(waypoint.angle), sin(waypoint.angle)} )

    = abs((x-way.x)*cos(waypoint.angle) + (y-way.y)*sin(waypoint.angle))

    vector

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.