![]() |
Level-Wide Strings
Is there a way to create a level-wide string in a local NPC? I tried leaving the entire NPC serverside and just setting the string [if (created) setstring head,head0.png], shouldn't everybody in the level now be able to access and change the contents of the string? When I tried it online, the string acted clientside and if another player changed the string I couldn't see it change.
An example of this is if you have a level you want to allow and disallow people, an npctest usually. I want to be able to say "add <player>" and it will add the player account to the level-wide string. I tried doing a script like this with the latest version of graal but in the end I was stuck with serverside variables. It's very peculiar, it's worked in the past for me... :) |
Quote:
|
if done serverside
setstring head,whatever; is saving to the client who the npc is currently accessing and arent heads #3? #3(index) gets the head of the player with that index you can use gani attributes but it will lag if they are too big |
well not just heads i mean like... take the script i mentioned earlier. if i wanted to make a level i can allow and disallow people in by saying "add <account>" and "remove <account>", is there a way to create a string that all the clients can access in that level simultaneously that's not server-wide?
|
so that... they can't get in the level? if other clients can't access the information it's useless, the only person i would be able to block is myself.
|
...you know, if you have an npc that checks:
if (playerenters) { it executes for every player that enters the level. And surprisingly enough, this NPC can read its own strings/variables. Think about it. |
that's not what i'm trying to do kai & tseng. bah, nvm x.X
|
Quote:
|
Now we're all hurt :( See what happens when I ask questions?
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Take this:
Quote:
http://kaimetsu.bravoonline.net/monkeylaughing.gif ;) |
Surely you will all hate and laugh at me for this but a serverside string that is level specific and accessible to the clientside.
setstring serverr.#L.string, just include the #L and it will be as if it were a level string even though it's serverwide. The downside, if you need a lot it will crowd the server flags list. The only thing I use server strings for is temporary stuff for moving data around. |
Adam has a point >.< I still dont' see the whole point of this ANYWAYS. Might as well make a database NPC and save this.strings... or if there really will be that many, then there are npcs[i].save[i] that I really don't ever use but I know that they exist =p
You can also do with(getnpc(Control-NPC)) and set this.strings ;) Amazing isn't it =p this.#L.yourstupid ;) LOL j/k. but no there are many ways. If you STILL can't figure it out, and you NEED this NPC... you should know where to find one of us >.< ---Shifter |
Quote:
|
Quote:
Why would you want to send excess of data to EVERY client, when 1 npc can just handle the 1 level? |
Quote:
|
1 Attachment(s)
Quote:
EDIT: 10 seconds after posting: Jagen: dude Jagen: you cant strangle the moneky Jagen: its too strong for you Jagen: HOW DARE YOU EVEN TOUCH IT :[ CheeToS: lol Jagen: bish Jagen: *stranges the cheetos* Jagen: omg so crunchy = Jagen: [ |
1 Attachment(s)
:D.
|
1 Attachment(s)
bwahaha.
|
1 Attachment(s)
Karsh wins.
|
1 Attachment(s)
Hah, no match.
|
1 Attachment(s)
Quote:
|
LoL, I was reading this post yesterday, now I woke up and read it today. Everyone has gone Insane! Even the mods O.o (who are probably insane already)
But hey, I like insanity! *draws something o.O* |
LOLOLOL PWNED OMG WTF LOLOL!!11!!!!
http://www.harley.com/abstract-art/i...-mona-lisa.jpg |
1 Attachment(s)
the monkey lives a lonely life...then
|
1 Attachment(s)
Another gani explains my feelings.
|
1 Attachment(s)
Quote:
Allow this to show mine. Maximise GraalShop. |
Quote:
|
1 Attachment(s)
Quote:
|
Haxing is bad, karsh XD
|
1 Attachment(s)
:) again.
-EDIT- Kai, you should sticky this thread. |
omg what happened. i stopped looking at forums for two days and I come back and there's monkeys all over. i repeat, see what happens when i post things?
|
*****! Invasion of the monkeys! Pretty funny actually.
But no, it all depends. I was just stating ways it COULD be done. It depends on how intensive the whole NPC is, and it's usage for what you want. But I still don't see the point >.< ---Shifter |
well for my purposes I kind of like the getnpc() idea, which i never thought of :p
|
Quote:
|
| All times are GMT +2. The time now is 04:40 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.