Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

kai00

6
Posts
2
Topics
A member registered Nov 09, 2020

Recent community posts

Thank you your advice. (But I hope you to write with English)

I understand I have to add "this.depth = -1" and "this.depth = Math.round (ct.random (5))" to objects.

But where should I write them in?  On Create, OnSterp or anything else?

Hi, I'm still waiting for somebody give me a reply for realize what giving to character or object multi depth.

(Multi depth is meaning , character or object get the depth setting  more than 1.)

Could you give me a hint?

(1 edit)

I'd like to give object multi depth. 

I image some pipes has 0 to 5 depth, player get depth 6 while clicking mouse for avoiding crash to pipe in Jetty Cat.

How can I realize it with ct.js?

(2 edits)

I realized what I want with the code below

On Create

this.speed = 10
this.direction = 0
ct.camera.follow = this
ct.camera.followY = false
ct.camera.shiftX = 250

On Step

if ( ct.actions.Poof.down ){
    this.gravity = 2
    this.addSpeed(ct.delta * 4, 90)
}
if (ct.mouse.x < 10){
    this.x = ct.mouse.x
}
if ( ct.mouse.y > 0 && ct.mouse.y < 1920){
    this.y = ct.mouse.y
}
this.move();

Thank you to gave me reply. It works.

I appreciate you to develop ct.js very much. 

I'd like to make a character to follow mouse cursor. 

How can I get x and y of mouse cursor, and make the character following mouse cursor?

Please write a example code, if you can.