![]() |
Can flags be unset by NPCs in other levels online?
If a player is in a different level and an NPC tried to unset a flag from that player would it work online, because it doesn't offline.
|
How can a clientsided NPC access a players attrivutes when it's not in the level?? You would need a serversided npc it use a with (getplayer(account)) |
Would that lag like a server.string?
|
Quote:
If non-p2p you could have a weapon that sets it depending on server string... On p2p you could have a server side section that uses with and unsets it... |
Like this?
NPC Code: |
Quote:
NPC Code: If you want to get the player who owns it, it's more like: NPC Code: [edit] And I missed a parenthesis (sp...i know) [/edit] |
I'm guessing with (getplayer) doesn't work offline either?
|
Quote:
Jagen: Yep, anything involoving with is only supported by an NPC Server |
Well if this is p2p, I believe I am correct in saying you could make it auto kill if the player leaves the level like this, I don't beleieve it works non-p2p.
NPC Code: |
i personally hate to use flags unless it is REALLY necessary just b/c it lags too much. LAG in my point of few ruins things. While it isn't worth sacrificing an entire great NPC, i try and use other things. Add an NPC, maybe just one, that is a system and edit flags in that or something, or have it update each time. Server flags lag. Sans used a server flag for each person, and they had to remove it b/c of all the lag! So having a server flag for EACH person can SERIOUSLY lag. And can't you just {set flagname} then l8er put {unset flagname} l8er??
---Shifter |
Oh yeah, or attachplayertoobj might work too! Use variables. if (playerperforms action)this.action=1;
if (this.action==1) then whatever you want it to do. It does not even need to have ne GFX to work. ---Shifter |
Quote:
|
That about somes it up, thanx ;) Heh. If you put a flag on, it can just be a client side flag. The only reason you would need a server flag is if it is accessible to multiple people. Client flags lag a hell of a lot less (each server flag = about 1 flag per person!) and aren't a big deal. just use set flagname
---Shifter |
Clientside flags referring to specific flags used for the player that stay in the client. Normal client flags would be a lot less complex. Like ... :asleep: so tired! Heh, um, like set and unset. or if something, then something...
---Shifter |
Heh, as i figured. Is there a chance you'd be nice enough to explain all the p2p stuff to me? I do only non-p2p, put i figure if i am going to be posting and making scripts for people, then i might as well figure out the p2p stuff just in case.
---Shifter |
How about e-mailing me or IM'ing me and explaining a few key points? LOL, if not that is cool.
---Shifter |
Allright thanx. I'm about to go soon. BGut you're giving me something to do. I hit refresh adn wait to see when Emortylane doesn't dominate the entire last posts on the page, lol.
---Shifter |
hmmmm
Heres an idea dont know if it helps ya any.
In a p2p server if there is an item like maybe you pick up an emerald and the first person to the king gets 10 gralats. Then you could do something like this. //In a weapon script //#CLIENTSIDE if(created) { setimg emerald.png; } if(playerenters||timeout) { if(!strequals(client.emeraldpickuptime,serverr.eme raldtime)) { destroy; } } //In emerald area script if(created) { setimg emerald.png; setshape 1,32,32; } if(playertouchsme) { if(strlen(#s(serverr.emeraldtime))=0) { setstring serverr.emeraldtime,#v(timevar); } setstring client.emeraldpickuptime,#s(serverr.emeraldtime); addweapon Emerald; } //In Kings Script if(created) { //putmakekingtypethings here } if(playertouchsme&&hasweapon(Emerald)) { setstring serverr.emeraldtime,; playerrupees+=10; removeweapon Emerald; say2 Thank you young man this#bwill make a nice ring for me.; } I think thats all im late for class try it out |
Heh. if (action) setstring string,value;
---Shifter |
| All times are GMT +2. The time now is 07:05 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.