![]() |
clicking other players
im trying to make a profile system and when u click on urself or someone else their profile shows up...but i dont know how to make it when you click on other players to make it work
can someone give me like an example script on how to make something happen when u click on another online player |
You'd probably want to start off with mousedown and testplayer.
|
can u gimme an example script...make it like use say2 or something
|
You could take a look at the Graal Wiki (http://wiki.graal.us/GScript sounds like it'd be useful for you) to get information about the particular functions or events.
|
You want it so when you click on someone an action occurs, so you probably want to start with the mouse action, there are several mouse flags that detect mouse action such as
NPC Code:mousedown as Lance mentioned, then you probably want it to detect if a player is there so the final action doesnt just pop up out of nowhere even when there's no player there, so you can use NPC Code:testplayer(x,y) that'll return the index of the player at x,y. now depending on what you want the final action to be, you can use different commands, you can use say2 as you mentioned. p.s. soo many run-ons |
Quote:
|
Quote:
Quote:
Quote:
|
soo
if (mousedown){ if (testplayer(x,y){ blah?; } } ?? |
You should probably use mousex and mousey.
|
Quote:
Also, if I remember correctly, testplayer returns the index of the found player, not true/false. You might want to modify your testplayer() check to support that. |
It returns -1 if no player is found at the specified location, otherwise the player's id (I'm not absolutly sure whether it returns the level or server id, but if I remember correctly it's the server id), yes.
Ben just pointed out that level/server id might be confused with an id for a level/server or stuff, the correct names would be id for the player number for the entire server, and index for the player number local to the level. Although I consider these even more confusing. |
http://img.photobucket.com/albums/v4...obsoletion.png
Bam! I just made all this GScript talk totally redundant. |
Quote:
|
will someone just give me an example script !pissed!
|
Quote:
Read the thread for the info we've given you. |
-_-
|
Quote:
|
| All times are GMT +2. The time now is 03:11 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.