Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-19-2004, 09:12 PM
Salaisuus Salaisuus is offline
Registered User
Join Date: Mar 2004
Posts: 68
Salaisuus is on a distinguished road
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?
Reply With Quote
  #2  
Old 11-19-2004, 09:19 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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) ?
Reply With Quote
  #3  
Old 11-19-2004, 10:56 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Salaisuus
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?

That's clientside, right?
Reply With Quote
  #4  
Old 11-19-2004, 11:59 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
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.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #5  
Old 11-20-2004, 12:13 AM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
I'm pretty sure it doesn't need to be clientside.
Reply With Quote
  #6  
Old 11-20-2004, 12:24 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
//#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.
Reply With Quote
  #7  
Old 11-20-2004, 02:06 AM
Salaisuus Salaisuus is offline
Registered User
Join Date: Mar 2004
Posts: 68
Salaisuus is on a distinguished road
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
Reply With Quote
  #8  
Old 11-20-2004, 02:16 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
GMaps are just like huge levels. (30,30) only refers to one point on the whole thing, not one per level.
__________________
Reply With Quote
  #9  
Old 11-20-2004, 02:27 AM
Salaisuus Salaisuus is offline
Registered User
Join Date: Mar 2004
Posts: 68
Salaisuus is on a distinguished road
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.
Reply With Quote
  #10  
Old 11-20-2004, 03:01 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
No, I would imagine that both are working. They're just not doing what you think they should.
__________________
Reply With Quote
  #11  
Old 11-20-2004, 03:09 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Wether you use = or == doesn't matter.
And the mouse and keyboard functions ONLY work clientside.
__________________
Do it with a DON!
Reply With Quote
  #12  
Old 11-20-2004, 03:27 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by Salaisuus
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.
Like Kai said, GMAPs act like 1 big level. Meaning, playerx and playery will go over 64.

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.
Reply With Quote
  #13  
Old 11-20-2004, 05:12 PM
Salaisuus Salaisuus is offline
Registered User
Join Date: Mar 2004
Posts: 68
Salaisuus is on a distinguished road
But when I press f5 on gmap it shows the level name and the cordinates on that one level.
Reply With Quote
  #14  
Old 11-21-2004, 12:34 AM
Salaisuus Salaisuus is offline
Registered User
Join Date: Mar 2004
Posts: 68
Salaisuus is on a distinguished road
Quote:
GMaps are just like huge levels. (30,30) only refers to one point on the whole thing, not one per level.
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.
Reply With Quote
  #15  
Old 11-21-2004, 02:14 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
yeah, and if you do 90 30 you will come to the middle of the level right to the first one.
__________________
-Kjetil Valen
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:05 PM.


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