Need lua to disallow the conc explosion
Ok here's what I want / need.
I want for a conc to only be able to be fired inside the trigger IF the player is holding it. If they toss it, I want it to either disappear or not be fired. I tired using this code from the no_annoyances and it's not working for some reason: Code:
function noannoyances:onexplode( explode_entity ) |
Well, this isn't perfect, but it does what you want...
Code:
function player_onthrowgren2(player, prime) |
lol not really...as long as they can't toss it down then that's fine by me. Plus this is all I need to run my last compile and release so something that small isn't really going to bug / stop me.
|
Thats good 'cos I'm not sure how to remove it :P
|
You could just remove their concs when they are out of the area and add them again when they are back?
|
well I want / need them to be able to HH the conc, but not to toss it. :cry:
Also me and pon have been going back and forth trying shit and nothing is working...any other ideas? |
Something like if the grenade is yours and is not more than 1 unit away, allow blast. Dunno how to code that though.
|
You could try enabling a trigger_remove that only removes grenades in player_onthrowgren2()
|
I think if the whole onthrowgren2 thing was working, the above code from Pon would have fixed it already.
|
Quote:
|
yeah that seems to be the problem...I can't tie it to a trigger_ff_script b/c it's an entity so it either works all the time or never.
|
Quote:
|
Ok, on the offchance that this might help someone else finish it off, here's what i was trying to do:
Code:
local c = Collection() |
so yeah...I'm an idiot and am very sorry to have wasted everyone's time:
http://developer.valvesoftware.com/wiki/Trigger_push Speed of Push: 2000 Flags: Clients (un-check) Physics Objects (check) FF Grenades (check) Dropping conc sends it flying across the room, problem solved! Again very sorry everyone... |
Oh good it worked :)
We are victorious! |
yeah I didn't have the map you told me about, but I did remember that concmap_cave had the same thing so I decompiled it and copied what PSF had in there and it worked great!
thanks for your help everyone! I am running the last (hopefully) compile right now and should have this thing released tomorrow. |
All times are GMT. The time now is 02:10 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.