Official Soldat Forums
Server Talk => Scripting Releases => Topic started by: urraka on November 18, 2007, 09:10:24 pm
-
Script Name: BulletText
Script Description: Draws text with bullets.
Original Author(s): PerroAZUL
Core Version: 2.6.3
Some months ago I made this script. It's cool but I never released it because the results weren't as I expected. The players couldn't see the text I was writing with the script because it requiers to send too many bullets I guess. Anyway, I'll release it so you can see it, and maybe you find some use for it.
It has one main function:
procedure DrawBulletString(text: String; x, y, size, resolution: Single; align: String; bullet: Byte);
In the script I included some commands so you can test it:
/loadletters - This will load the letters stored in letters.txt. That file contains all capitalized letters, an space and the symbol "!". Any letter can be added if you understand the format in which it's saved. The format consists of a list of lines, each line as 2 points.
/write [text] - This will write the text near the player, with flame as bullet type. Justs as an example.
Here a preview of what it does:
(http://img88.imageshack.us/img88/5084/himends8.png)
-
WOW!!! that amazing (clicks download button ;) ) !!! Um confused... does it work, or not ??? Oh well... ill try it out...
EDIT: i dont get how to use it :-\
EDIT 2: Ok, i get it now... Its pretty nice :)
-
oh wow.....this is really wierd. Gj on it though...
-
WOW!!! that amazing (clicks download button ;) ) !!! Um confused... does it work, or not ??? Oh well... ill try it out...
EDIT: i dont get how to use it :-\
EDIT 2: Ok, i get it now... Its pretty nice :)
It works just fine, the problem is that when spawning too many bullets players can't read the text very well.
To use it first use the command /loadletters, then you can use /write [text]
-
That is friggin awesome,
how long does the text stay up?, if it is short you could have an option for duration and keep remaking the bullets according to the duration
-
Won't this cause a lag spike ? Special with long sentences ?
-
Well, last night i got it to work, and i can explain some of it.
/loadletters
That loads the configuration in the letters.txt file, which configures where bullets spawn for each letter.
/write
this wont work without doing /loadletters, because the letters wont be set to spawn anywhere. The letters that are built in are all the alphabet (which is in all caps, so typeing "i am cool" wont work, and "I AM COOL" will), a space (just so space bar works, spawns no bullets), and an exclamation point. So the letters you can type are:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z !Â
(note the spacebar at the end)
I think I saw some other odd (different) characters in there, but if your not sure or forget, when you type /loadletters , it shows up in the script console.
Most important:
Letters/text/flames:
Letters and text only show up for about 1-2 seconds, but it looks cool.
FAQ: I might add more later
Lag spike?
Not that i know of. The letters only stay up for 1-2 seconds.
Longer time durations?
Maybe. Im not a big one on complicated scripts, but im OK at it, so if PERRO doesnt want to make it, I could TRY. And PERRO, i think it wouldnt be TOO hard to do... Wouldnt it just take an AppOnIdle that goes of every like... second (or, if implemented, your timer suggestion, if it comes out soon enough)? When the AppOnIdle finishes (Equals Zero) then it could make the bullets again (might make a HUGE lag spike lol)? I was thinnking about this last night, before Chutem even posted...
My Questions: Once again, might add more ;)
1:As said before, AppOnIdle added?
2: is it me, or would it be REALLY easy to change the bullet type?Writing "DIE!!!" really high up in m79 nades, and watching your word kill Everyone (lol) would be pretty histerical ;) (hehe sticks and stones can break my bones, but words can blow my head off 8) )
3: I have to go, but ill add more later, sorry :'( And if im being a know-it-all, sorry again :-\ i just have half an hour on my hands, and I like this script ALOT ;D
Thanks,
Chuck/1221995
-
Great thanks for releasing this one, PerroAZUL. If you wouldn't mind, I might incorporate it into Fistbox (with your permission of course).
-
Won't this cause a lag spike ? Special with long sentences ?
You might be right there. Actually, something like that is why I hadn't released it before.
Also, I think you can't write long sentences, because there seems to be a limit on the number of bullets you can spawn at the same time. You can check it, write a long sentence and see how some letters or part of them are missing. And another thing, you might see it working perfectly in a local server, but I'm not sure how well it is seen by remote players.
That is friggin awesome,
how long does the text stay up?, if it is short you could have an option for duration and keep remaking the bullets according to the duration
The text stays up only for a little while, it's just a bullet appearing. The flames dissapear very quickly. If you change the bullet type it lasts a bit more, because you can read it while the bullets are falling.
1221995:
Yes, you could try using AppOnIdle. I'm not sure how well that would work, maybe it'd go fine. It would be easy because it's just calling one function: DrawBulletString. I'm not planning to do it anyway, so you could give it a try if you want.
Great thanks for releasing this one, PerroAZUL. If you wouldn't mind, I might incorporate it into Fistbox (with your permission of course).
No problem, feel free to use it as much as you want :p
-
I also coded something like that, but mine is way too laggy.
-
I can't imagine anything like this not to be laggy. That said, I'd love to see someone prove me wrong.
-
Oh wow... I looked at the code, and its WAY too complicated for me. Im a begginer at scripting, and thats pretty advanced... Maybe someone else could do it though?
-
Really good script. Thanks.
-
Oh, and my last post was a request lol ;p
-
I don't think it's worth wasting time adding stuff to this script unless somebody confirms that it isn't too laggy and it works fine. I don't really feel like testing it right now.
-
You made a script and haven't even tested it ?
:P
-
The script works fine... I tested it in my own local server that's all. So I don't know how well it goes with the connection. I think I've made it clear.
-
Just a thought, Can that kill?
-
I set to 0 all the parameters of CreateBullet, so it shouldn't make damage.
-
I think the normal text was better, using bullets in text formation seem a clumsy way to do something that can already be done in a better way.
And besides, I really don't need any more lag, I already get about 180-260 in all servers usually.
-
I think the normal text was better, using bullets in text formation seem a clumsy way to do something that can already be done in a better way.
And besides, I really don't need any more lag, I already get about 180-260 in all servers usually.
duh....
1.: This script of course only serves for special purposes and can be used for funny gimmicks. It's not meant to replace the usual DrawText
2.: It doesn't cause any ping increement but rather little lag spike that can cause a very short moment of warping or stuff like that.
-
DAMN NICE :D
-
what is ord()
btw, if you change text in drawbulletstring to uppercase(Text) then it will write text even if it's lowercase
-
Ord() returns the ASCII code corresponding to the character.
I didn't use UpperCase(Text) because lower case characters can be added to letters.txt
-
well uppercase() is a good temporary fix (until someone adds lowercase letters)
btw, how would you add a slash ( / ) would you only put two coords in letters.txt and the script would fill in the rest of the bullets?
(like (0,0) (50,-100) or something?)
so would ord('i') return the chr() value for 'i' ?
-
The '/' would be like:
/=0.7,1,{[0.0, 2.0],[0.7,0.0]};
The format is
character=<width>,<Number of Lines>,{[x1,y1],[x2,y2]},..
The width of the letters already done is 1.0, and the height is 2.0. That's why I chose 0.7 for the width of this character.
As for the other question:
'i' = chr(ord('i'))
-
does ord() work with sentences too?
ord('all your base are belong to us!')
for i := 1 to Length(str) do
ord(str[i]);
is that w/o str being an array?
-
And what do you want to get from that? If you want the code of each character you can iterate through the string:
for i := 1 to Length(str) do
ord(str[i]);
-
just wondering, because these things are good to know if I suddenly need to script something with chr()'s
-
PerroAZUL Esta Bueno El Script Todavia No Lo Bajo Pero Se Ve Bueno :D
-
PerroAZUL Esta Bueno El Script Todavia No Lo Bajo Pero Se Ve Bueno :D
English only please.