Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: KillJoyYT
is it possible to create a trigger use or damage that will activate fx?
for example you buy or shoot an object and smoke or fire appears.
any help is appreciated thank you
ModmeBot:
Reply By: modric
ModmeBot:
Reply By: Harry Bo21
modric
function fxtrigger() { trigger = ("fx_trigger", "targetname"); while ( 1 ) { trigger waittill( "trigger", player ); } playFX( level._effect["powerup_grabbed"], self.origin ); }
ModmeBot:
Reply By: modric
i thought adding a break will make it only able to play once? also yea i meant to have the fx in the brackets
ModmeBot:
Reply By: KillJoyYT
ok do I have to change the powerup_grabbed
also theres no targetname for fx do I just add a kvp?
ModmeBot:
Reply By: mathfag
Zone
Top of script
Bottom of script
OR if you want to reuse the trig
NOTE:
If the effect you spawn is a looping effect it will play forever
ModmeBot:
Reply By: Harry Bo21
trigger.origin will be in the middle of the air...
a triggers origin is the centre of the brush
and i realised that - but he didnt say he wanted it to work more than once, and regardless was broken
so my point stands, check your code or stop answering, every single time you do i spot major problems, you are CONFUSING these noobies
ModmeBot:
Reply By: mathfag
Harry Bo21
trigger.origin will be in the middle of the air... a triggers origin is the centre of the brush and i realised that - but he didnt say he wanted it to work more than once, and regardless was broken so my point stands, check your code or stop answering, every single time you do i spot major problems, you are CONFUSING these noobies
ModmeBot:
Reply By: Harry Bo21
firstly how do you know thats what he wants?
secondly why have a trigger around it, when you can just "enable damage" on the model itself so its actually "accurate" and not some random box "around" the actual mesh of a model? if anything its simpler too
thirdly the use of the code is irrelevent, you are posting broken code after broken code - CHECK it works, you are making life HARDER for people already seeking help
Its not rocket science
ModmeBot:
Reply By: Abnormal202
Harry Bo21
firstly how do you know thats what he wants? secondly why have a trigger around it, when you can just "enable damage" on the model itself so its actually "accurate" and not some random box "around" the actual mesh of a model? if anything its simpler too thirdly the use of the code is irrelevent, you are posting broken code after broken code - CHECK it works, you are making life HARDER for people already seeking help Its not rocket science
ModmeBot:
Reply By: mathfag
Harry Bo21
firstly how do you know thats what he wants? secondly why have a trigger around it, when you can just "enable damage" on the model itself so its actually "accurate" and not some random box "around" the actual mesh of a model? if anything its simpler too thirdly the use of the code is irrelevent, you are posting broken code after broken code - CHECK it works, you are making life HARDER for people already seeking help Its not rocket science
ModmeBot:
Reply By: Harry Bo21
arguing semantics now
check your code works in future
simple
ModmeBot:
Reply By: KillJoyYT
I'm sorry for the confusion guys. I would rather have trig damage.
I put the code in my gsc and
idk
im confused with what kvps I need and what variables I have to change
ModmeBot:
Reply By: mathfag
KillJoyYT
I'm sorry for the confusion guys. I would rather have trig damage. I put the code in my gsc and idk im confused with what kvps I need and what variables I have to change
ModmeBot:
Reply By: Harry Bo21
much better
ModmeBot:
Reply By: KillJoyYT
wow you guys are awesome thank you
one more question!
I change "powerup_on_solo" to another fx thats in my fx browser?
so for fire would it be this?
ModmeBot:
Reply By: mathfag
KillJoyYT
wow you guys are awesome thank you one more question! I change "powerup_on_solo" to another fx thats in my fx browser? so for fire would it be this? function damage_trig() { trig = GetEnt("d_trig","targetname"); trig waittill( "damage" ); PlayFX( level._effect["fire_barrel_factory_zmb"], trig.origin ); trig Delete(); }
ModmeBot:
Reply By: Harry Bo21
wrong
the array is "created" in _zm yes, you can "add to" it whereever
ModmeBot:
Reply By: Abnormal202
Harry Bo21
Level._effect effects are effects that are defined somewhere like in _zm.gsc wrong the array is "created" in _zm yes, you can "add to" it whereever
ModmeBot:
Reply By: Harry Bo21
Abnormal202
Harry Bo21 Level._effect effects are effects that are defined somewhere like in _zm.gsc wrong the array is "created" in _zm yes, you can "add to" it whereever only lameos use level effects