CS2D
Scripts Portal gun attack Portal gun attack
7 replies 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. 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. >But if you use "attack" hook, it must works.
it doesn't. Well, actually it spawns the object orange portal and blue portal. thx cap. But there's no way to catch the event when someone uses portal gun, right? DC Admin Offline
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. 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. Thanks you
I'll try to catch it with 'build' hook, if possible