Forum

> > CS2D > Scripts > Portal gun attack
Forums overviewCS2D overview Scripts overviewLog in to reply

English Portal gun attack

7 replies
To the start Previous 1 Next To the start

old Portal gun attack

JONY
User Off Offline

Quote
I was wondering why does attack (as well as attack2) hook doesn't catch portal gun shots. Technically it's a weapon, but when you create portals (shoot), hook doesn't register them as "attack" action. Is there a way to know when a player "shoots" portal gun(id=88 ). Thanks.
J.

old Re: Portal gun attack

uaiek
User Off Offline

Quote
attack2 hook is the form of "attack to", if you use this hook, portal shoot on ground not the player. So nothing to "attack2".

But if you use "attack" hook, it must works.

old Re: Portal gun attack

JONY
User Off Offline

Quote
thx cap. But there's no way to catch the event when someone uses portal gun, right?

old Re: Portal gun attack

DC
Admin Off Offline

Quote
they are not triggered because the portal gun is a special weapon (obviously) which doesn't use the regular weapon attack function but a special portal function.

this portal function doesn't trigger the attack Lua hooks. you could say that this is a bug. I'll see if I can change that for the next release.

old Re: Portal gun attack

Yates
Reviewer Off Offline

Quote
But can't you return the hook when spawning the object, orange and blue portal? So that they will never spawn. I think that's what he is trying to accomplish.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview