mark
1
When i click it doesn’t warp me I have to hold down the left mouse button and then turn it on for it to warp me.
if (playerenters) toweapons WarptoMouse; {
OnOff();
warper();
function OnOff() {
if(weaponfired) {
if(!this.warp) {
setplayerprop #c,ON;
set this.warp;
}
else {
setplayerprop #c,OFF;
unset this.warp;
}
}
}
function warper() {
if(this.warp) {
if(leftmousebutton) {
this.mousex = mousex - 1.5;
this.mousey = mousey - 2;
playerx = this.mousex;
playery = this.mousey;
}
}
}
}
Jatz
2
You’re not checking if a mousebutton is pressed, use
if (mousedown && leftmousebutton)
…
[quote]if (playerenters) { <- Add that
toweapons WarptoMouse; { <- get rid of that
OnOff();
warper();
} <- Add that
…
} <- get rid of that[/quote]
Also why do you have a weaponfired inside of a function? You can’t activate it from inside there…
Jatz
5
Congratulations to mark for actually doing some scripting though, instead of begging for someone to do it for him.
mark
6
[QUOTE=Beholder;56789]
…
Also why do you have a weaponfired inside of a function? You can’t activate it from inside there…
[/QUOTE]
Oh i did not know that.
You can’t learn if you beg someone else to do it.
Kondie
7
That’s how I learned lol.
mark
8
Well that’s not how i like to learn 
Spooon
9
I wish all the newbies were like Mark. :[