Files

> > CS2D > Lua Scripts > [B2] Player Trails (1.5)
Files overviewCS2D overviewLua Scripts overview

English [B2] Player Trails (1.5) >

24 comments5 kb, 391 Downloads

old [B2] Player Trails (1.5)

BCG2000
User Off Offline

[CS2D] Player Trails (Lua)
By BCG2000
Description: Real player trails, made possible by the new sprite capabilities of CS2D images.
Version: 1.5 (September 30th, 2016)
Copyright © 2016, BCG2000

[INSTRUCTIONS]

- Just extract the file on your CS2D folder.
- You can change the amount of trails by changing the "B2PT_MaxTrails" variable in the script.
- You can enable/disable the trails by saying "!pt" in the chat (you must be logged in the RCon).

PS: Because of the Lua memory leaks in this game (as of the time I made this script), I did things like setting locals to nil and using timers instead of hooks like "always". Otherwise, the code would be a bit more clean.

[RULES]

√ You can use this script on your server.
√ You are allowed to edit the script and/or build on top of it and you can also link it to your own scripts, but if you do so then give me credit.
× You are NOT allowed to claim this script as your own.
edited 1×, last 10.11.16 03:12:55 am
Approved by Yates

Download Download

5 kb, 391 Downloads

Comments

24 comments
Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Gaios
Reviewer Off Offline

not bad
I like it!

old

Mora
User Playing CS2D

@user BCG2000: Whatever, i tried to leave it many times but everytime back and some friends too.
Anyway, good luck and have a good time
I like it!

old

BCG2000
User Off Offline

@user Mora: As said in the instructions section, you can already enable/disable the trails by saying "!pt" in the chat.

It's not possible to detect when it will cause lag because that depends on the connection speed of who is playing on the server. Some players may be able to handle 3 or 4 trails for example, but that will make players with slow connection speed lag out very easily. Like I said before, I already left max trails as 2 by default, because that is the optimal setting for everyone.

There is no command to set max trails ingame because that would mess with the array allocation (but it's possible to make it so that there is a minimum and max trails amount). But I don't think it's necessary and/or worth it, it's fine the way it is, just change the value in the script.

If you need any additional features on the script then you can extend it yourself, I won't update it anymore because I left this game. However, it's the final version of the script, so it's already optimized and bugs were fixed.
edited 1×, last 11.11.16 05:54:16 am

old

Mora
User Playing CS2D

@user BCG2000: should be changeable by command also via rcon-logged, to make possible "on" & "off" these settings and if it cause lags you get the caution message.
@user kerker: 25 exactly.
I like it!

old

BCG2000
User Off Offline

@user VADemon: The only config I put is max trails, but you can easily edit it to use other images and extend it, the code is organized and commented.

@user kerker: In the code comments I say:

"Only active weapons and items (that are held in the player's hands) are put here. Passive items like defuse kit and armor are not included, they could be included but it would make the script more potentially laggy than it already is."

This includes silencers as well, and the fact that they don't appear is not a bug, but an intended feature or more precisely said, an optimization. I already left the script in an optimal state, like max trails being 2. More images or a higher trail count will easily cause lag if not controlled.

old

kerker
User Off Offline

Okay, though a special place for the script is not found, the script is done pretty well. 4/5
Off-Top:
Spoiler >
I like it!

old

Mora
User Playing CS2D

Hm, interesting, more trails - better. It's okay when you are alone in sv.
And what about silenced weapons?(there's two only(as i know)):
I like it!

old

VADemon
User Off Offline

Sick idea, I like it!

You will get an extra point if it's easy to repurpose the script to use another image & if longer tails are possible. (Sorry, I don't have time to look at the script right now)
I like it!

old

kerker
User Off Offline

Well, okay. Wait for my useless script in the distant future.
I like it!

old

Rainoth
Moderator Off Offline

@user Jite: So what's wrong then ? This is like hats. They're useless but a great addition to make "fun" servers more enjoyable.
I like it!

old

Jite
User Off Offline

@user Rainoth: Sure I thought about a possible usage, but only the prophunt usage seems to be useful, anything else I can't imagine how it should be good. Well, sorry for posting here again..

old

kerker
User Off Offline

Well, user BCG2000 maybe you're right. Thank you for taking the time to leave a comment.

But the feeling, like playing on the old grandmother's computer.It would be possible to add this effect only when you press the "Shift" that the standard slows down the player.

I do not change my rating yet. 2/5
I like it!

old

Rainoth
Moderator Off Offline

@user Jite: It's useless for standard game. Nobody said it has to be for standard game, though. You could think of things this could be used on if you took the time.

@user BCG2000: Glad you put this as a standalone.
P.S. Nice avatar. Noticed just now.
I like it!

old

Ajmin
User Off Offline

Looks good..
I like it!

old

Jite
User Off Offline

@user BCG2000: I'd liked to know what you answered to user kerker, however I still don't see any sense why you should want a lag effect. However, well done.

old

Lobwver
User Off Offline

It's a nice concept. Could remplace those awful red boxes of debuglag also.

+1
I like it!

old

francis007
BANNED Off Offline

Just posting negative comments, that's very useful. Good job guys!

I think this script is a good idea maybe someone can add it to fun scripts or other scripts.
I like it!

old

BCG2000
User Off Offline

@user kerker:

- Hide and Seek or Prop Hunt with FOW enabled (anyone who moves will leave trails that are visible through the FOW, thus being easily spotted).
- As a visual effect for a power-up like increased damage or focus effect.
- Could also be a power-up to make it harder to hit the user.
- Can be edited to further enhance it, like making a colored rainbow trail.
- Can also be used to represent a "lag effect".

There are several uses, you just have to think of them. I also never saw any player trails visual effect like this before.
To the start Previous 1 2 Next To the start