Forum

> > CS2D > Scripts > Portal gun attack
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Portal gun attack

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Portal gun attack

JONY
User Off Offline

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

alt Re: Portal gun attack

uaiek
User Off Offline

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

alt Re: Portal gun attack

JONY
User Off Offline

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

alt Re: Portal gun attack

DC
Admin Off Offline

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

alt Re: Portal gun attack

Yates
Reviewer Off Offline

Zitieren
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht