Forum

> > CS2D > Scripts > Tactical shield block detect
Forums overviewCS2D overview Scripts overviewLog in to reply

English Tactical shield block detect

6 replies
To the start Previous 1 Next To the start

old Tactical shield block detect

ReVoltage
User Off Offline

Quote
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..

old Re: Tactical shield block detect

Rainoth
Moderator Off Offline

Quote
I had the same thing, here's a part of message about how tactical shield works.
DC has written
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.

old Re: Tactical shield block detect

Rainoth
Moderator Off Offline

Quote
@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...

old Re: Tactical shield block detect

Zeik
User Off Offline

Quote
@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)

old Re: Tactical shield block detect

DC
Admin Off Offline

Quote
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.

old Re: Tactical shield block detect

Rainoth
Moderator Off Offline

Quote
user Zeik has written
@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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview