![]() |
Server-Wide Strings (HELP ME)
Ok, this is kinda a n00b question, but here goes...
how do initalize a server-wide string, and would it work offline? |
easy:
setstring server.<stringname>,string; and yes,it works offline |
grrrrr
|
cool... im trying to make a radio station that brodcasts all over the server... thanks man
oh yeah... and to display it would be setcharprop #c, #s(server.blahblah); right? |
no cause if u want to display a string u gotta use the setcharprop, i think...
oh yeah... that doesent work... how do i display a string as a message above the npc like the text box |
message #v(server.string);
you used #s, but use #v |
yeah message() is the exact same as setcharprop
its just the equivalent in function like NPC Code: whereas sayradiothing() is just the exact same as message() so it doesnt matter whether you use message or setcharprop anyone know how to supply the function definition an argument? i keep getting a syntax error =\ it would be really nice if you were doing lots of lines of messages with the same beginngin like a game show "And the question is..." so you would be able to redefine message (orwhatevr you want it) as NPC Code: |
Quote:
Why shouldnt functions be able to take arguements? what kind of language is this? that's half the reason they're there.. |
Kaimetsu it does work, why dont you open up Graal and try it before you jump to conclusions? =\
The only reason I put it inside an event is because i was fooling around obviously you wouldn't want a radio to turn itself on and tune into a station as soon as you entered the room |
Quote:
if youre at college why are you messing around with a game language so inferior compared to others its laughable? why arent you programming with other things? most of these people are under 15. |
it's just an example I'm not mr. perfect when I script Graal NPCs especially when its just to ask/answer a question.
|
Ow... my head... can someone just post the script?
|
...thats exactly why i dislike this forum
half the topics are GIV MI DIS PLZ BYE |
oh well, without some help we would never learn, now would we????
|
"helping" isnt saying 'here' and posting the script for you to copy and paste
|
ok fine... just tell me the right way to make a string and to display it on a NPC in another level
|
Radio Script
I have never made an NPC like this but ill give it a shot:
this would be for like a DJ Booth: NPC Code: this would be for all of the other radios: NPC Code: Like I said im not sure if this will work. |
hmm... where is the chatstring from the DJ get converted to the server string? oh wait i think i see it...
yah nevermind im just a stupid n00b |
Ill help :)
if (weaponfired&&!weaponon) {setplayerprop #c,On.; set radioon;} else if (weaponfired&&weaponon) {setplayerprop #c,Off.; unset radioon;} if (radioon&&playerchats(#c, )) {setstring server.radio,#c; setstring server.radionick,#n; } and to display them in another NPC timeout=0.1; if (timeout) {message #s(server.radionick)#s(server.radio); } |
WOW MAN U R KOOL I HAV DIS NOW AND I MA NOT STOOD NOW... OH YAH I NEED DIS KAY? BY
|
hehehe... that was kool
OK I HAVE DIS BUT WHAR IS MA ODER SKRIPT? I NED TI NWO! |
*confused* :confused:
|
| All times are GMT +2. The time now is 08:06 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.