Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   defining player position online (https://forums.graalonline.com/forums/showthread.php?t=56084)

Skyld 11-21-2004 02:18 PM

Quote:

Originally Posted by Salaisuus
If I have a 9 level gmap and I say warpto 30 30 name.gmap
Where should thsi take me?
Because when I do this it warps me in midle of the upper left corner level.

It should take you to the top-left level. As Kaimetsu said, a GMAP links the levels together as one. If you warp to (94,94) on name.gmap, it'll take you to (30,30) of the level b2 (if your GMAP level filenames follow that pattern).

ZeroTrack 11-21-2004 04:03 PM

or you could just use the map and ctrl + leftmouseclick that warps you to where ever you click

Slash-P2P 11-21-2004 04:37 PM

Just have an npc define the players position for you.
PHP Code:

if (playerchats && strequals(#c,show position)) {
setplayerprop #c,(#v(playerx),#v(playery));



Salaisuus 11-21-2004 08:41 PM

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:

Kaimetsu 11-21-2004 09:31 PM

No clientside setlevel2.

ZeroTrack 11-21-2004 10:42 PM

use triggeraction to serverside for the setlevel2

Salaisuus 11-22-2004 02:05 AM

Quote:

use triggeraction to serverside for the setlevel2
Like this?

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?

Skyld 11-22-2004 02:29 AM

Is this a level NPC or a weapon?

Salaisuus 11-22-2004 03:13 AM

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.

Tolnaftate2004 11-22-2004 03:32 AM

Unless you're on the npc, it won't trigger.

Salaisuus 11-22-2004 03:54 AM

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.

Tolnaftate2004 11-22-2004 04:05 AM

It triggers to the NPC at (playerx,playery).

Salaisuus 11-22-2004 04:31 AM

Ehhh..? It send the action (warp to a level) to the playerx/y or I dont understand anything.

ZeroTrack 11-22-2004 02:50 PM

Quote:

Originally Posted by Salaisuus
Like this?

if (actionserverenter) {
setlevel2 ihategscripts.nw,30,30;}
//#CLIENTSIDE
if (actionleftmouse && int(playerx)=<30) {
playerdir=0; unfreezeplayer; setani idle,; triggeraction playerx,playery,serverenter,;
}

PHP Code:

if (actionenter) {
  
setlevel2 ihategscripts.nw,30,30;
}
//#CLIENTSIDE
if (actionleftmouse && int(playerx)=<30) {
 
playerdir=0unfreezeplayersetani idle,; triggeraction x+1,y+1,enter,;


the action is supposed to happen to the npc, the way you had it is the only way it could work is if the playerx and playery were the same as the npc's x and y. this way it triggers it inside the npc no matter where the player is
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

Tolnaftate2004 11-22-2004 11:56 PM

Quote:

Originally Posted by ZeroTrack
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

Triggers beginning with server automatically trigger to the Control-NPC (other than serverside). I think.


All times are GMT +2. The time now is 02:13 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.