HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger help for spell augmentage

07-06-2003, 09:31 PM#1
combatken
1. I'm trying to make an erase skill, which removes its victim from the game. I based it off of charm and the trigger runs (The screen fades), but the unit isn't removed.

Events
Unit - A unit Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(charm))
Actions
Cinematic - Fade out and back in over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
Wait 1.00 game-time seconds
Unit - Remove (Target unit of issued order) from the game


2. I'm trying to make a self-cast banish spell. (because changing target to SELF and targeting yourself is kinda lame) I made a dummy spell (WindDance) that the hero casts. When it does, a wisp is created with the Banish spell and range 99999 to banish the caster, but I'm not sure why this works..


Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to WindDance (Triggered)
Actions
Unit - Create 1 WispCaster for Neutral Passive at (Center of ACastZone <gen>) facing Default building facing degrees
Unit - Order (Last created unit) to Human Blood Mage - Banish (Casting unit)
Unit - Remove (Last created unit) from the game



Off note, how do you change the size Avatar makes the unit? AOE affecting size doesn't work anymore ;(
07-07-2003, 03:51 AM#2
combatken
Bleh..does anyone know how to do this kind of stuff yet?
07-07-2003, 04:06 AM#3
angelofdeathx
not sure but try baseing it off a diffrent spell as charm .
as for the second set of triggers what exactly is the question
07-07-2003, 04:32 AM#4
combatken
Oh, sorry, the thing wrong with the second spell is that it won't work.

For the first spell, I don't think it matters what spell its based off of, because it least the first (Erase spell) runs, but the Unit - Remove (Target unit of issued order) from the game part won't work.
07-07-2003, 04:53 AM#5
dataangel
Quote:
Originally posted by combatken

Wait 1.00 game-time seconds

That's the problem with the first one right there. If you use a wait, all of the Event Response functions (like "Target Unit of Issued Order") stop working. It doesn't matter whether you use a normal wait or a polled one. Sucks doesn't it? The way I've gotten around this in my map is to create a dummy unit -- set its model to a blank space make it's selection value as small as possible, etc. so that it can't be seen. Instead of the wait, create one of these dummy units and give it a life timer equivalent to the wait (in this case one second). Then setup a second trigger to detect the death of the dummy unit, and perform the actions you want then.

The only problem you'll have is you'll need someway to store the unit that's supposed to be removed. The way I did this was to give all units entering the playable map area a unique index in a unit array, and storing the index in their custom value. Then, when you create the dummy unit, you give it the same custom value as the unit to be removed (make sure you make the dummy unit an exception to the every unit gets a custom value trigger). When the dummy unit dies, you kill array[custom value of dying unit]. Yes, I know this is a PAINFUL workaround. Yes, IT SUCKS. But it's the only GUI way to do it.

If you want to jump into JASS, simply create a local variable and assign it to target unit of issued order at the top of the trigger. Then perform the remove action on the local variable instead of the targeted unit.

Quote:
2. I'm trying to make a self-cast banish spell. (because changing target to SELF and targeting yourself is kinda lame) I made a dummy spell (WindDance) that the hero casts. When it does, a wisp is created with the Banish spell and range 99999 to banish the caster, but I'm not sure why this works..


Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to WindDance (Triggered)
Actions
Unit - Create 1 WispCaster for Neutral Passive at (Center of ACastZone <gen>) facing Default building facing degrees
Unit - Order (Last created unit) to Human Blood Mage - Banish (Casting unit)
Unit - Remove (Last created unit) from the game


Eh, I'm gonna trust you mean "I'm not sure why this doesn't work." Don't ask why things do work ;)

If it's not working it's probably because the unit is removed before it has a chance to cast the spell. Instead of removing it right there, setup another trigger to detect the wispcaster finishing casting banish, and remove it then.

Quote:
Off note, how do you change the size Avatar makes the unit? AOE affecting size doesn't work anymore ;(


No ability editor way to do it as far as I can tell. A really easy way would simply to setup a trigger:

Event
Unit casts ability
Condition
Ability being casted is Avatar
Action
Set Scaling Value of casting unit to (100 + (Level of Casting Unit)*.1)%.

I'm not sure if the "finishes casting ability" event works with avatar's timer being up, but if it does, that's when you'd set the scaling value back to 100%.
07-07-2003, 04:53 AM#6
combatken
Got the second one working, just a simple error. Apparently the proxy unit that banishes needs "mana" to cast it *cough*

I've been trying a lot of things for the erase skill though, and it needs to be charm for the level cap. (Otherwise my Dimensional mage would be erasing bosses from time, and that just wouldn't do) Is there a way to create a region at wherever the mouse is currently at, because that's one way I thought of doing that. (It would also be a better solution for AOE triggered spells, rather then summoning a unit, creating a region around it, and removing it which is clunky)
07-07-2003, 04:55 AM#7
dataangel
You replied like 2 seconds after me :P

I'm replying so when you see the last person who posted on the thread it isn't yourself so you'll look at my post ;)
07-07-2003, 04:56 AM#8
combatken
Ah, missed your post there, sorry. I'm just gonna give wait the boot, because I don't think all THAT is necessary for one measly spell.. (Oh, I tried devour, but that just makes the game crash if you try making it a hero ability) Thanks! :D

[Edit: Dang! I gotta stop posting right after you :P I'll just take a quick break]