Make when you press a key like p go to full screen?


#1

Ok so Im trying to make it so when you press a key such as p that the window goes to fullscreen automatically I tried it but the script isnt working.

var RenderAi = pc.createScript('renderAi');

//Im adding the fullscreen mode//
RenderAi.prototype.intalize = function() {
    //will have key//
if(this.app.keyboard.isPressed(pc.KEY_P)) {
    this.app.keyboard.isPressed(pc.KEY_P,this.screen.fullscreen);
}

    
    };



#2

Fullscreen meaning the page takes up the whole screen?


#3

Yes obviously


#4

There’s already a built in option for that. Press the F11 key or press FN + F11.


#5

No I want it to be custom for matrexball by pressing p I want it to go to fullscreen


#6

Somethings wrong with the Fullscreen code it keeps saying this and idk what to tweak at I dont want to mess up anything or make it worse


#7

I’ll check it out later. I got an online class rn.


#8

online class I thought you went to that tech school?


#9

I got an online class for a different language


#10

Nice lol but nvm I fixed it It was the returnFullscreen code that I made haha


#11

k


#12

Im in so much stress and I wanna do so much with matrexball also so how we gonna fixed the score system? unless you have a copy of the old script


#13

lol nvm again I fixed the scoresystem ez