Ok so I created the dummy and what is the triggering for the Flash of Light ?
Could you explain what you mean by this question exactly? If I understand you correctly, you're asking how to make a triggered spell work. In order to tell you that fully, we need to know what you want the triggered spell to do.
Since you initially wanted the Flash of Light spell to be based on Holy Light, I'm going to assume that you want it to have the effects of Holy Light but only targeting enemies for damage rather than also being able to heal allies. So here's the way that works:
1) Give your hero or unit or whatever both Holy Light (modified however you want Holy Light to work for that unit) and a dummy spell* called Flash of Light.
*If you don't know what a dummy spell is, here's an explanation: A dummy spell is essentially a trick we use to make players think their hero is casting a spell whose effects actually come from another unit or a trigger. A dummy spell costs mana, has an animation, has a cooldown, has an appropriate icon and tooltip, etc. but doesn't actually have all the effects it says it has. For example, I'm going to assume for the moment that you want Flash of Light to be like Holy Light except only for attacking undead and not for healing allies. In that case, you could create a new spell based on Channel (Which is a hero ability by default). First change Stats- Hero Ability to false. Change the Art- animation names to probably just 'spell' instead of 'spell, channel' or to whatever animation you want your unit to play when it casts the spell. Change the Art- button positions to wherever you want the icon to go. Delete Art- Caster and Art- Effect unless you want some kind of art to show up on the caster. Change Art- Target to Holy Light. Change Stats- Levels to however many levels you want the spell to have. Change Text- Name to Flash of Light. You might want to change Text- Editor Suffix to (dummy) or something like that to remind you that this is a dummy ability. Change Text- Hotkey- Normal to whatever you want the hotkey to be. For every level, change Data- Base Order ID to some kind of random ability you aren't using (Maybe forceboard, I don't even know what that is). Change Data- Follow Through Time to 0 for all levels. Change Data- Options to Visible for all levels. Change Data- Target Type to unit target for all levels. Change Stats- Cast range to whatever you want the spell to have at each level. Change Stats- Cooldown to whatever you want the spell to have at each level. Change Stats- Mana cost to whatever you want the spell to cost at each level. Change Stats- Targets Allowed to probably Air, Ground, Enemy. Maybe through in Organic or something if you want it to not be able to affect mechanicals. Change the various different tooltips at each level to whatever you want those to say. There, done! Just put this ability in the spellbook or give it to the unit or whatever.
2) So now your unit has both Holy Light and a spell that pretends to be Flash of Light and has the cost, cooldown, etc. of Flash of Light but actually does nothing. To make it do something, you'll probably want a hidden ability that has the real effects. If you want the effects of holy light cast offensively, then you might as well base the hidden ability on holy light. So make a new ability based on holy light. Call it hidden flash of light or something. First, go to Stats- Hero Ability and make it not a hero ability. Set the levels to however many levels you want Flash of Light to have probably. Get rid of the art- target since your dummy covers that. For every level, change the Data- Damage to be 2x however much you want the spell to do. Set the cast range to 99999 or something. Set the mana cost to 0. There, that's done.
3) Now make a dummy unit** which will cast that spell and give the spell to it.
**A dummy unit if you don't know is a hidden unit which works behind the scenes to make abilities work. To create a dummy unit, just create a new unit based on, say, a footman and change some things about it. Change abilities- Normal to Locust and whatever spells you want it to cast. Change Animation- Cast Backswing and Animation- Cast point to 0. Change the Art- Model to .mdl . Change the Art- Shadow Image to None and all the other shadow data to 0. Scroll down to Combat- Attacks Enabled and set that to None. Change Movement- Turn Rate to 3. Change Sound- Unit Soundset to None. Just in case, change STats- Mana Initial Amount and Stats- Mana Maximum to 100000 or something. And then Change the name to Dummy Caster or whatever you want and you're done.
4) Now we have to make this dummy unit cast the spell in question. We do that via triggers. Open up the trigger editor and click the folder icon for new category. Name that whatever you want. Maybe Spellbook Spells or something. In that category, click the paper icon for new trigger. Rename that to Flash of Light. Ok, now the important stuff. Click the red flag button (Or control + E) for new event. In the list find Unit- Generic Unit Event. Click where it says 'Dies' in blue. In the new list find Starts the Effect of an Ability and click that. Ok out of those menus. Ok now click the button with a paper and a green arrow (Or control +D) for a new condition. In that list find Ability Comparison at the top. Change Animate Dead. In the Value section change Hero to Unit and All to Custom and then find the DUMMY SPELL. Make sure you choose the DUMMY SPELL that your hero or whatever has rather than the real spell that the dummy unit will cast. Ok out of those menus.
Let's review what we have so far. First, your hero has two spells. One is called Holy Light and is directly based on Holy Light. The other is called Flash of Light. This spell will be like Holy Light but can only be cast on enemies. The spell he has, called Flash of Light is secretly a dummy spell that doesn't do anything but cost mana and limit who he can target. You also have a hidden unit which knows another spell which has the real effects of Flash of Light. However, currently that dummy unit doesn't exist on your map and will never cast that spell. We do, however, have a trigger now which will successfully detect when your hero casts the dummy spell Flash of Light. That's what the events and conditions so far do. Now you need to finish the trigger so that it makes the dummy unit cast its hidden spell that has the real effects of Flash of Light.
5) Click the X button (Or Control + B) to create a new variable. In that menu, click the green X with a + to actually add the variable. Change the name to maybe TemporaryPoint and the variable type to point and then ok out of those menus.
6) Click the New Action button next to the new condition button (Or Control + R). Go to Set Variable near the top. Change Variable to Temporary Point. Then change Value to Unit- Position of Unit under the function list. Ok out of those menus.
7) Go down to Unit- Create Unit facing angle. Change Footman to Dummy Unit. Change Player 1 (Red) to probably neutral passive. Change Center of Playable Map Area to Temporary Point. Ok out of those menus.
8 ) Click the New Action button next to the new condition button (Or Control + R). Go down to Unit- Issue Order targeting a Unit. Change the first Unit to Last Created Unit near the top of the function list. Change Attack to Human Paladin Holy Light. Change the second Unit to Event Response- target unit of ability being cast. Ok out of those menus.
9) Click the New Action button next to the new condition button (Or Control + R). Go down to unit- add expiration timer. Change 60 to 1 or 2 or something. Change Triggering Unit to Last Created Unit. Ok out of those menus.
10) Click New Action button next to the new condition button (Or Control + R). Go to Custom Script near the top. Change Script code to "call RemoveLocation (udg_TemporaryPoint)". You need to get that code exactly right (Without the ""s obviously for it to work. Change the TemporaryPoint to whatever your variable was named if you chose for it to be named something different. Capitalization matters. Ok out of that menu.
11) That's it! You now have a trigger which, when the FLash of Light dummy spell is cast, will cause a hidden unit to be come into existence, cast a spell that generates the real effects of FLash of Light and then be deleted.
Your trigger should look a bit like this (Though my ability is named Battle Trance (E) and my unit is Dummy Unit and so on):
-
Flash of Light
-
Events
-
Unit - A unit Starts the effect of an ability
-
Conditions
-
(Ability being cast) Equal to Battle Trance (E)
-
Actions
-
Set TempPoint = (Position of (Triggering unit))
-
Unit - Create 1 Dummy Caster for Neutral Passive at TempPoint facing Default building facing degrees
-
Unit - Order (Last created unit) to Human Paladin - Holy Light (Target unit of ability being cast)
-
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
-
Custom script: call RemoveLocation (udg_TempPoint)
So I guess that's my mini guide to how to make a dummy spell work assuming the spell you want is holy light. I shall answer your other question in a little while.