![]() |
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.
|
Quote:
|
or you could just use the map and ctrl + leftmouseclick that warps you to where ever you click
|
Just have an npc define the players position for you.
PHP Code:
|
Well this still doesnt work on gmap and I dont know why.
if (actionleftmouse && int(playerx)=<30) { playerdir=0; unfreezeplayer; setani idle,; setlevel2 effthis.nw,38,61; } Works fine on normal levels, In gmap it only sets gani and doesnt warp. :pissed: :pissed: :pissed: :pissed: :pissed: :pissed: |
No clientside setlevel2.
|
use triggeraction to serverside for the setlevel2
|
Quote:
if (actionserverenter) { setlevel2 ihategscripts.nw,30,30;} //#CLIENTSIDE if (actionleftmouse && int(playerx)=<30) { playerdir=0; unfreezeplayer; setani idle,; triggeraction playerx,playery,serverenter,; } Because it doesnt work. or did I miss something? |
Is this a level NPC or a weapon?
|
Level npc. You mouse click it and it warps you to a level.
Or thats what its supposed to do. I cant understand why it works on normal levels online but not on gmap. |
Unless you're on the npc, it won't trigger.
|
Doesnt trigger eeven if the player is on it. And the way I undertand that script, it should comit the action on the player on the playerx/y.
But Im propaly mistaken. |
It triggers to the NPC at (playerx,playery).
|
Ehhh..? It send the action (warp to a level) to the playerx/y or I dont understand anything.
|
Quote:
PHP Code:
understand now? --- Edit --- Oh wow , well ok theres another problem that i encountered while testing it... this is an odd one, but you can't have server as the begining word .... just put enter and actionenter |
Quote:
|
Thank thee.
It works now. Whee..! |
no problem
|
All times are GMT +2. The time now is 12:04 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.