HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Flamethrower Model Effect Help

12-20-2005, 06:55 AM#1
mmx2000
I downloaded a .mdx special effect for a flamethrower that I'd like to use for a unit's firing animation (think firebat). I don't want a continuous stream of shooting - I want it to fire with a normal cooldown, just a burst that runs the special effect.
I thought maybe I could create a dummy ability using the Orb of Slow as a base, but I can't figure out how - or at least, what field to use to run the special effect ONLY when it is firing, and not when the unit is just putzing around (this is what it's doing now when I try - it continuously runs the animation whether its firing or not).


Also, somewhat related - anyone know how to make it sound like a blast of fire when he shoots? >.>

Help a noob plz^^
12-20-2005, 10:59 AM#2
iNfraNe
just add the special effect when the unit attacks and remove it again after a short period of time (I hope it has a death animation else this wont work)

and for the sound, use Sound - Play sound on unit or something like that.
12-21-2005, 01:30 AM#3
mmx2000
I tried that with weapon firing cooldown of .9, and a delete last created effect with a cooldown of .8. I thought that'd work, but something got effed up, as the effect didn't get deleted. I'll try again with a delete-last-effect timer of like .5...
You're solution just makes lots of triggers when I'm pretty confident this can be done with abilities...
12-21-2005, 10:33 AM#4
iNfraNe
It didnt got deleted cus you used last created special effect, which gets overwritten each time you create a new one. You should use local variables on this, there are alot of tutorials about them, read some.
12-21-2005, 11:20 AM#5
Vexorian
It could be that the model doesn't have a dead animation
12-22-2005, 07:50 PM#6
mmx2000
I don't believe the problem is with the model. I think the problem is just the way I'm handling it. I looked at creating a var for it, but it doesn't seem there is an easy way to "Set" a Special Effects variable equal to an effect using the built-in WE interface. It only gives me the choices of setting it to another variable (useless...) or to {Last Created Special Effect} which seems to be causing problems. I'm guessing I either need to use a simple-text version of the trigger to do it (which I don't know how to do >.<) or to try at the map initialization creating a dummy of the effect and then hoping that the next command will be to set the var=last created effect and will work.

Even if I could create that as a local var., I'm a little confused how to implement it in multiple instances (as in... I have more than 1 flamer unit). If I do something like creating the effect on any of the matching attacking units, and then try and delete it, I'd think I'd get a problem where it would only delete the effect on 1 unit, or on all of them, but the timing would be off in correspondence to the units' attacks. So I was thinking maybe create an array, but this raised some questions for me:
- When you define an array you also define it's bounds/limits. Obviously I don't know how many flamer units I'm going to have, so I'd have to implement something every time I create a new flamer that copies the entire tracking array into an array of size+1. Unless you can redefine array bounds on the fly, or if WE has a built-in handling mechanism for trying to assign to an array cell that is out of bounds?


It seems like there's an easier way to do it with local variables that you're referring to but my searches are helping me much.
12-22-2005, 10:56 PM#7
Soultaker
You can see a variable to the Last Created Special Effect.

This way you would be able to set the effect to a variable that you could remove after time and that wouldn't cause any bugs.

-Soultaker
01-18-2006, 03:58 AM#8
mmx2000
In the end I got it to sort of work with custom script local variables... however, the effect would still fire off 3 times before being destroyed. I'm not sure if its a buggy model or if there is some hidden lag time in Destroy Effect. Looks like I'm stuck with Breath of Fire for the missile art T_T
01-18-2006, 01:07 PM#9
Azazel_
This is an example of what you may want to do for your special effect :

Code:
call DestroyEffect(AddSpecialEffectLoc( "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", l ))

You can paste this as custom script if you are using GUI. l represents the location variable, which could be replaced to udg_myloc and creating a Variable of type 'point' named myloc. udg stands for User Defined Global. Also replace the effect path with the appropriate one.
01-18-2006, 02:04 PM#10
Panto
Although I recognize you're getting the information for the trigger necessary to do this in a more foolproof way, before the Orbs stopped working on automatic attacks, this Firebreathing Demo was a great way to do it.
01-18-2006, 06:51 PM#11
mmx2000
Quote:
Originally Posted by Azazel_
This is an example of what you may want to do for your special effect :

Code:
call DestroyEffect(AddSpecialEffectLoc( "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", l ))

You can paste this as custom script if you are using GUI. l represents the location variable, which could be replaced to udg_myloc and creating a Variable of type 'point' named myloc. udg stands for User Defined Global. Also replace the effect path with the appropriate one.

Just to clarify, as I am indeed using GUI, I can just define a global via GUI called "myloc" of type point, then reference it in script as udg_myloc, right? However, I'm not sure what that point is supposed to be. Is that the attachment point of the unit? And if so, how do I "Set" that variable before I call the function?

And FYI, the effect does supposedly have a dead animation, but maybe the model is bugged. Here's the link if anyone wants to check it out: http://wc3sear.ch/index.php?p=Models&ID=2232&sid=
01-18-2006, 09:20 PM#12
Panto
There is a firebreathing-usable model included in Warcraft 3. I don't remember the path, but it's in that map. Works like a charm.
01-19-2006, 12:31 AM#13
mmx2000
Im using Breath of Fire atm, which works, but its such a big (Wide) model. BTW... I think that model I dl'd DOES fire off 3 times as part of its animation, cause I tried setting it to just be a missile to test it, and it went 3 times. Sucky >.<
01-19-2006, 02:59 AM#14
Panto
No, it's not even the animation from Breath of Fire. It's a simple fire emitting thing, I think used originally by Blizzard as a trap in a dungeon. Go look in the map, when you have time. It really is pretty much perfect.
01-19-2006, 04:31 AM#15
Azazel_
Panto's suggestion better meets your needs, I believe.