DreiAugenFrosch's Recent Forum Activity

  • Oh wow! Thank you!

    Ok my problem was the "Force own texture" checkbox! Now it works 😁

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there,

    I want to make a cut out or see through effect. I tried to make a example:

    So the square moves, but the texture on the square should be static and not move. Like a flashlight effect. Everything is dark except for the spot where the flashlight illuminates the surroundings. Only here I want that not everything is dark, but that you can still see the rest of the surroundings.

    Tagged:

  • Hey there,

    I am relatively new to construct. To practice I want to try to write the Flappy Bird template project fully in JavaScript.

    So first I created a Class Player:

    class Player extends ISpriteInstance {
    	constructor() {
    		super();
    	}
    	
    	jump() {
    		this.behaviors.Platform.vectorY = - this.behaviors.Platform.jumpStrength;
    		this.angleDegrees = 320;
    	}
    	
    	tick() {
    		
    		this.angleDegrees += 60 * this.runtime.dt;
    	}
    }

    And a StartUp Script:

    runOnStartup(async runtime => {
    	runtime.objects.Player.setInstanceClass(Player);
    	
    	runtime.addEventListener("beforeprojectstart", () => {
    		runtime.addEventListener("mousedown", (e) => {
    			const Player = runtime.objects.Player.getFirstInstance();
    			
    			if(Player) {
    				 Player.jump();
    			}
    		});
    		
    		runtime.addEventListener("tick", () => {
    			const Player = runtime.objects.Player.getFirstInstance();
    
    			if(Player) {
    				Player.tick();
    			}
    		});
    	});
    });
    

    Everything works fine exept the jumping part. The bird is rotated but no jumping force (vectorY) is applyed. It seems that this is only a read only value. The documentation says, that you can also edit the value (https://www.construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/behavior-interfaces/platform). What am I doing wrong?!

DreiAugenFrosch's avatar

DreiAugenFrosch

Member since 4 Jan, 2020

None one is following DreiAugenFrosch yet!

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies