HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Creating a casting unit/effect unit

02-07-2006, 06:29 PM#1
Themerion
Background:
I have made an ability which uses moving lightning balls (Unit Missiles - Far Seer). The Lightning balls are a customized unit type that I have created from Circle of Power. They belong to Player Neutral Passive.
I've also tried to attach the lightning ball effect to my casting unit, but...

The way I want it to work:
* The Lightning Balls hover 64.0 above the ground.
* They are almost impossible to select / unselectable.
* They do not display a green hit point bar, not even if the players press down the Alt-button.

Problem:
* It appears to me that a not-a-building unit always displays its hit point bar, which is very annoying.
* To make it not display the hit point bar, I can set the model to a file that does not exist, like "void.mdl". However, then I failed to attach special effects to it.
* But... if the Circle of Power is a building I can not set it's height! The effect is supposed to look like it's smoothly floating over the ground, not cutting through it!

(edit)
Solutions?
I checked the spellfactory's nova spells, and it uses (if I'm not mistaken):
- DestroyEffect( AddEffect...(...) )
But won't this reset the animations?

I also checked the Collision Missiles, but it seems like they use the Casting Unit, which has a hit point bar.

Are there perhaps a .mdx or .mdl file which is completely invisible, has the "origin"-attachment point, and do not have a hit point bar?
02-07-2006, 08:27 PM#2
Chuckle_Brother
The locust ability(Aloc), or you could use a generic dummy with the dummy.mdl model and attach an effect to it.

Note: Generic dummy still needs the locust ability or else you can select it.
02-08-2006, 02:23 AM#3
Vexorian
Hmnn Use GetACaster() / AddCaster()
02-08-2006, 02:57 AM#4
Chuckle_Brother
I think what he really wants is turning them into some funky looking effects like you do with some of your shield templates and nova templates.

Would there be any way to change the tinting of an effect added to a dummy unit?
02-08-2006, 10:35 AM#5
Vexorian
Use GetACaster / AddCaster.

And the answer to your question, Chuckle_Brother is duh. If you change the tinting of a unit it also changes the one of its effects
02-08-2006, 05:51 PM#6
Themerion
Yay! Thanks a lot Chuckle_Brother, the Locust ability was precisely what was needed
I simply added it to my effect units and the hit point bar disappeared. Hehe, now I'll try to add it to my caster and attach the lightning ball effect to it instead :)

And, Vexorian, don't your casters have a hit point bar, visible when holding down the Alt-button? I placed one of your casting unit in the spellfactory.w3x map, and when I test ran it, it displayed a hit point bar when I pressed the Alt-button.
02-08-2006, 05:57 PM#7
Vexorian
Of course, but who told you that unit is to be preplaced / created manually?

that's the reason you have to use GetACaster() or AddCaster() or AddCasterFacing()
02-08-2006, 06:29 PM#8
Themerion
Ah, so it adds it and the flying height ability. I see... This makes me curious: why do you add the abilities with the trigger instead of implementing them in the Object Editor?
02-09-2006, 12:43 AM#9
Vexorian
because I have to remove it too (The flying height thing) Also if you use GetACaster you can use an already created caster and then recicle it so it can be used again by GetACaster .

There was a time giving Locust to a unit directly in object caused problems and that's the reason I add it with native UnitAddAbility. It is probably safe now but no need to change that stuff.