Forum

> > CS2D > Scripts > Tactical shield block detect
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Tactical shield block detect

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Tactical shield block detect

ReVoltage
User Off Offline

Zitieren
I have tried this, but "hit hook" cant detect this..
Is it possible to detect when a bullet is blocked by tactical shield?
If possible, then how to do this?
If not possible, any other way how to detect this?

Thanks before..

alt Re: Tactical shield block detect

Rainoth
Moderator Off Offline

Zitieren
I had the same thing, here's a part of message about how tactical shield works.
DC hat geschrieben
So it basically just calculates the difference between the two angles shot direction and target player (with shield) rotation and the player is protected if that angle is below 55°

The other part is for shield blocking from teammates.

I also have the script but I won't post it unless DC agrees that I can cause he gave it to me.

alt Re: Tactical shield block detect

Rainoth
Moderator Off Offline

Zitieren
@user Zeik: Whenever someone shoots, you do a linear calculation. Basically check if there's a person at the line of shot in every uhh.. 8 pixels further or so. Well you can do it with 1 pixel but you'd get that many more calculations (extra lag I guess) so it's a choice of each scripter... if it detects a player of same team it carries on and if it's not a player of same team, it checks his rotation and if he's using tactical shield. Add user DC's calculation (55 degrees) and there... Oh and you also break the loop for linear calculation (so you don't detect any other people that might be there...)

That's how I'd do it I guess...

alt Re: Tactical shield block detect

Zeik
User Off Offline

Zitieren
@user Rainoth: Isn't it way easier if DC makes the hit hook detect when the shield blocks?

With what you said, we would be doing calculations that are already done by the game... Doesn't seem very efficient (I know it's the only possible way to do it)

alt Re: Tactical shield block detect

DC
Admin Off Offline

Zitieren
That's the point. It's the only way to do it unless I decide to add a shield hook - which I'll actually add to my todo list because it can be done in a minute or two (and yes, there's no doubt that this would be faster and easier). But note that I just released an update so the next one is probably a few months away.

alt Re: Tactical shield block detect

Rainoth
Moderator Off Offline

Zitieren
user Zeik hat geschrieben
@user Rainoth: Isn't it way easier if DC makes the hit hook detect when the shield blocks?

With what you said, we would be doing calculations that are already done by the game... Doesn't seem very efficient (I know it's the only possible way to do it)

That is so obvious.
I didn't try to prove anything, you just asked how it's possible without hit hook
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht