Sticking a CEG on a hit target
Moderator: Moderators
Sticking a CEG on a hit target
Is there any non-LUA way to get a CEG to be emitted from a target after its been hit? I'd like something to show its burning for some variable duration. It works fine for immobile structures, but how do I do it to moving units? It would be nice in a tank battle for the weapons to basically spawn a lengthy fire at their point of impact, a fire that would slowly subside and turn to a smoke emission until it reaches a certain point when it just ceases.
The only two ways I've been thinking it can be done is with LUA (make it set a timer for a unit to emit the CEG when it's been hit) or to follow a similar path using the cob. Unfortunately to make it emit at the point of impact seems monumental in itself. Is there some ulterior way/setting I'm missing where you can tag the CEG on the targeted unit?
The only two ways I've been thinking it can be done is with LUA (make it set a timer for a unit to emit the CEG when it's been hit) or to follow a similar path using the cob. Unfortunately to make it emit at the point of impact seems monumental in itself. Is there some ulterior way/setting I'm missing where you can tag the CEG on the targeted unit?
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Sticking a CEG on a hit target
Try the COB callin HitByWeaponID(). It's called whenever the unit is hit by a weapon. If you want it to be weapon-specific rather than unit-specific, you'll need to use the weapon ID (not sure how to set a weapon's ID, but HitByWeaponID() is called with the weaponID as the second argument).
Re: Sticking a CEG on a hit target
Pretty sure it goes in the tdf. And hitbyweaponID returns a percentage damage for the shot to do, so don't forget a return 100 at the end. Look at the chicken scripts in CA. I'll be fixing them soon to detect the queen's attack and not bleed from it.
Re: Sticking a CEG on a hit target
HUR HURMadRat wrote:Is there any non-LUA way to get a CEG to be emitted from a target after its been hit? I'd like something to show its burning for some variable duration.
Re: Sticking a CEG on a hit target
I would have been annoyed by this teasing, but I realized something. It's just going to come back and bite you with a bunch of people asking for status, to help take over, etc.
Re: Sticking a CEG on a hit target
FUCK YOU!!!!!!smoth wrote:HUR HURMadRat wrote:Is there any non-LUA way to get a CEG to be emitted from a target after its been hit? I'd like something to show its burning for some variable duration.
Re: Sticking a CEG on a hit target
Post again when you've released it.smoth wrote:HUR HURMadRat wrote:Is there any non-LUA way to get a CEG to be emitted from a target after its been hit? I'd like something to show its burning for some variable duration.
Re: Sticking a CEG on a hit target
Yeah, smoth, you got the idea. Ever see that old arcade game Tron?
I want some penetrator/anti-tank weapons to cause burning like in that game. Burns 3-5 seconds, then smokes for about the same amount of time in a heavy black, then gradually turns gray and fades out of the smoke until its just a fading wisp. Might be too graphics intensive for my hardware, but it should look nice.
I want some penetrator/anti-tank weapons to cause burning like in that game. Burns 3-5 seconds, then smokes for about the same amount of time in a heavy black, then gradually turns gray and fades out of the smoke until its just a fading wisp. Might be too graphics intensive for my hardware, but it should look nice.
Re: Sticking a CEG on a hit target
it is a doable thing and we have burning in TD. However, it can get pretty expensive pretty quick . I have given the code to quant and he made some cool LUA Particle System fire but I have not tried it yet. what do you need it for? or were you just curious if it could be done?
Re: Sticking a CEG on a hit target
More curious than anything.
When I do a project I tend to gather pieces over time then compile them together in a few long weekends. I'm not one to just sit down and just plug away every day until its done because the wife suffers. It lets the creativity flow a little bit in between developing each of the intertwined ideas. And it keeps me off the wife's shit list at the same time. :)
When I do a project I tend to gather pieces over time then compile them together in a few long weekends. I'm not one to just sit down and just plug away every day until its done because the wife suffers. It lets the creativity flow a little bit in between developing each of the intertwined ideas. And it keeps me off the wife's shit list at the same time. :)
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: Sticking a CEG on a hit target
Always a good thing *thumbs up*MadRat wrote:And it keeps me off the wife's shit list at the same time. :)
Re: Sticking a CEG on a hit target
shag her tired then go back to modding.