ok then i didn’t know
well then ok
nvm he’s active here the last time he logged in was 2 days ago
ok ;) what is his yt
His YT is also called Revon wait let me get the link
ill just search revon
oh i didn’t find him
did u get the link
ok thanks :)
hey @Revon or @Jovanny can you send some code and .wick files I need the moving platform code for sticking to it and @Jordy needs lockable doors
Moving platform code
It adds the platform’s speed to the player’s position (x coordinate) and its own position (x coordinate).
This is old code! And it is combined with “pixel perfect” functions for its collisions.
this.player_touch = false;
this.direction = 0;
this.SPEED = 5;
project.TILES.push(eval(this._identifier));
this.update_hitbox = function () {
this.hitbox = project.get_tile_hitbox(eval(this._identifier));
};
this.update_hitbox();
onEvent('update', function () {
if (this.x > 245 && this.direction === 0) {
if (this.player_touch) {
player.x -= this.SPEED * player.delta_time;
}
this.x -= this.SPEED * player.delta_time;
this.update_hitbox();
}
else if (this.x < 465 && this.direction === 1) {
if (this.player_touch) {
player.x += this.SPEED * player.delta_time;
}
this.x += this.SPEED * player.delta_time;
this.update_hitbox();
}
else {
this.direction = ((this.direction === 0) ? 1 : 0);
}
});
Lockable door
It checks if the “key” or moved block has reached the “key hole”. If it did, then open the door; else, lock it. For the locking part, it just disable the “teleportation”.
the “key hole”'s code:
onEvent('update', function () {
if (this.hitTest(box1)) {
door.locked = false;
}
else {
door.locked = true;
}
});
the door’s code:
this.locked = true;
onEvent('update', function () {
if (this.locked === false) {
if (this.hitTest(player)) {
gotoNextFrame();
}
}
});
Welcome back!!!
Thanks! I’m watching this forum, but I’m inactive for making games, proof of concepts, and stuff. School is the first priority! Even when I don’t want school. . .
I thought you were never going to reply
I’m not here that often. I’m here at least once a week.
can you send me a wick file for the the moving platform?