Warping Sciprt in GS2

[CODE]if (keypressed && keydown2(keycode(w),true))
{
playerx= mousex-0.75;
playery = mousey-0.75;

timeout = 0.05;
}
[/CODE]
can someone rescript it to GS2 ? :frowning:

kinda curious as to what you would want it for if it has to be in GS2. What’s stopping you from doing it on your own?

Lol? I learning to script Gs2.

Sounds reasonable

Haven’t done GS2 Stuff in forever, but this should work:

//#CLIENTSIDE
function onCreated() {
  onTimeout();
}

function onTimeout() {
  if(keydown2(getkeycode("w"), false)) {
    player.x = mousex-0.75;
    player.y = mousey-0.75;
  }
  setTimer(0.5);
}

I don’t have a compiler atm but try it out.

Also, learning isn’t asking people to spoon-feed code to you.

Sorry I don’t know how to sciprt

I’m not complaining about someone being on these forums, but surely I’m not the only one who’s like “…what?” regarding someone asking about GS2 here of all places.

function onKeyPressed(code, key)
{
  if (key == "w"){
    player.x= mousex-0.75;
    player.y = mousey-0.75;
    settimer(0.05);
  }
}

No, you’re not the only one…