![]() |
defining player position online
if (actionleftmouse && playerx=30) {plah plah}
works ofline but when online it doesnt seem to care about the playerx. Why is that, and is there another way? |
You are sure that the player is on that position? You could print out the position to verify (message #v(playerx)). Or do you actually want to access the position of the npc (x) ?
|
Quote:
That's clientside, right? |
Change the = to == (usually won't fix, but it's good to do), make sure it's clientsided, and make sure all of the commands and flags are valid.
|
I'm pretty sure it doesn't need to be clientside.
|
//#CLIENTSIDE
if (actionleftmouse && int(playerx)==30) { plah plah } You can get an integer of the playerx to make the position stuff less strict. That might solve your problem. |
if (actionleftmouse && int(playerx)=<30) {
playerdir=0; unfreezeplayer; setani idle,; setlevel2 effthis.nw,38,61; } I did this and it when clientside, it only sets gani. serverside it works just fine except when on gmap. In gmap its weird because sometimes it randomly works, mostly not. I've had other proplems with x's and y's on gmap, if (mousex=>41 && mousey=>43 && mousex=<44 && mousey=<46) {showtext 1,1,400,,,plaaplaa;} Npc like that only works if its on the first level (upper left corner) of gmap and not on others. And to make it work on other I'd have to put it on the first level and use x & y vallues like 125 or so. Someone tell me how to use npcs on gmaps x_x |
GMaps are just like huge levels. (30,30) only refers to one point on the whole thing, not one per level.
|
I put two of hese npc on gmap:
if (mousex=>41 && mousey=>43 && mousex=<44 && mousey=<46) {showtext 1,1,400,,,plaaplaa;} Only one works. And the one that works is in the upper left corner (a1) reacts to the x & y as if they where only on that one level. |
No, I would imagine that both are working. They're just not doing what you think they should.
|
Wether you use = or == doesn't matter.
And the mouse and keyboard functions ONLY work clientside. |
Quote:
Use a method of displaying your x (npc, f5) then place the npc where it should go on the map and change the x stuff to that x. Same goes for y if your using it. |
But when I press f5 on gmap it shows the level name and the cordinates on that one level.
|
Quote:
Where should thsi take me? Because when I do this it warps me in midle of the upper left corner level. |
yeah, and if you do 90 30 you will come to the middle of the level right to the first one.
|
All times are GMT +2. The time now is 05:03 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.