Author Topic: Nice useless script: BulletText.  (Read 7219 times)

0 Members and 1 Guest are viewing this topic.

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Nice useless script: BulletText.
« 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:
Code: [Select]
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:

« Last Edit: November 21, 2007, 12:26:02 pm by PerroAZUL »
urraka

Offline 1221995

  • Soldier
  • **
  • Posts: 206
Re: Nice useless script: BulletText.
« Reply #1 on: November 18, 2007, 09:52:04 pm »
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 :)
« Last Edit: November 18, 2007, 10:00:54 pm by 1221995 »

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: Nice useless script: BulletText.
« Reply #2 on: November 18, 2007, 10:00:02 pm »
oh wow.....this is really wierd. Gj on it though...

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: Nice useless script: BulletText.
« Reply #3 on: November 18, 2007, 10:11:20 pm »
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]
urraka

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Nice useless script: BulletText.
« Reply #4 on: November 19, 2007, 02:26:32 am »
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
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: Nice useless script: BulletText.
« Reply #5 on: November 19, 2007, 05:28:25 am »
Won't this cause a lag spike ? Special with long sentences ?

Offline 1221995

  • Soldier
  • **
  • Posts: 206
Re: Nice useless script: BulletText.
« Reply #6 on: November 19, 2007, 07:29:22 am »
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:
Code: [Select]
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

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: Nice useless script: BulletText.
« Reply #7 on: November 19, 2007, 07:37:12 am »
Great thanks for releasing this one, PerroAZUL.  If you wouldn't mind, I might incorporate it into Fistbox (with your permission of course).

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: Nice useless script: BulletText.
« Reply #8 on: November 19, 2007, 07:50:54 am »
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
« Last Edit: November 19, 2007, 07:53:01 am by PerroAZUL »
urraka

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Nice useless script: BulletText.
« Reply #9 on: November 19, 2007, 11:12:05 am »
I also coded something like that, but mine is way too laggy.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: Nice useless script: BulletText.
« Reply #10 on: November 19, 2007, 11:19:35 am »
I can't imagine anything like this not to be laggy. That said, I'd love to see someone prove me wrong.
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline 1221995

  • Soldier
  • **
  • Posts: 206
Re: Nice useless script: BulletText.
« Reply #11 on: November 19, 2007, 03:20:36 pm »
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?

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Nice useless script: BulletText.
« Reply #12 on: November 19, 2007, 05:14:34 pm »
Really good script. Thanks.
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline 1221995

  • Soldier
  • **
  • Posts: 206
Re: Nice useless script: BulletText.
« Reply #13 on: November 19, 2007, 08:11:41 pm »
Oh, and my last post was a request lol ;p

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: Nice useless script: BulletText.
« Reply #14 on: November 19, 2007, 08:56:54 pm »
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.
urraka

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Nice useless script: BulletText.
« Reply #15 on: November 19, 2007, 10:18:37 pm »
You made a script and haven't even tested it ?
:P
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: Nice useless script: BulletText.
« Reply #16 on: November 19, 2007, 11:24:31 pm »
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.
urraka

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: Nice useless script: BulletText.
« Reply #17 on: November 21, 2007, 10:13:33 pm »
Just a thought, Can that kill?
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: Nice useless script: BulletText.
« Reply #18 on: November 22, 2007, 01:52:28 am »
I set to 0 all the parameters of CreateBullet, so it shouldn't make damage.
urraka

Offline Avkon

  • Soldier
  • **
  • Posts: 136
  • Ah, whatever.
Re: Nice useless script: BulletText.
« Reply #19 on: November 22, 2007, 08:44:37 am »
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.