HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

AOE invisibility spell?

12-29-2003, 12:40 PM#1
Peacerich
Ive made a aoe invisility spell (aka invisibility who affects everybody in an area around caster) but somethings wrong. I keep reading the trigger over and over again, and i cant find anything wrong wit it!

Stealth
Events
Unit - A unit Begins casting an ability
Conditions
Actions
Game - Display to (All players) for 30.00 seconds the text: 1
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Stealth
Then - Actions
Game - Display to (All players) for 30.00 seconds the text: 2
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Stealth for (Casting unit)) Equal to 1
Then - Actions
Unit Group - Pick every unit in (Units within 500.00 of (Position of (Casting unit)) matching ((Owner of (Casting unit)) Equal to (Owner of (Picked unit)))) and do (Actions)
Loop - Actions
Game - Display to (All players) for 30.00 seconds the text: 3
Unit Group - Pick every unit in (Units within 500.00 of (Position of (Casting unit))) and do (Actions)
Loop - Actions
Unit - Add Permanent Invisibility to (Picked unit)
Wait 20.00 seconds
Unit Group - Pick every unit in Unit Group and do (Actions)
Loop - Actions
Unit - Remove Permanent Invisibility from (Picked unit)
Else - Actions
Else - Actions

The text messages are made for testing, i can see all text messages when testing (1,2,3) so apperaently the problem is "pick every unit in 500 of casting unit". Ive tried not using the "matching condition" but they still dont get invisible. Ive also tried picking units in area, making them into unit group, and THEN making unit group invis. Still doesnt work:(

PLZ HELP, PAYMENT: I SHOWED U THE SPELL SO FAR
12-29-2003, 01:35 PM#2
linkmaster23
Sigh,,,There it is again.

Unit Group - Pick every unit in (Units within 500.00 of (Position of (Casting unit)) matching ((Owner of (Casting unit)) Equal to (Owner of (Picked unit)))) and do (Actions)

that was before

Unit Group - Pick every unit in (Units within 500.00 of (Position of (Casting unit)) matching ((Owner of ( MATCHING UNIT )) Equal to (Owner of ([ CASTING UNIT )))) and do (Actions)

And that is after. When you match something you have to make sure that the next thing you say is matching. Then you want it to be the owner of the Casting unit so that they can reconize them as being player whoever. Otherwise your saying. If owner of Footman is equal to owner of footman. YOu dont want that. YOu want If owner of Fottman Is Equal to the owner of Kael. If you do that your just saying that if the unit exsists it will run the trigger. Get it?
12-29-2003, 02:43 PM#3
Peacerich
lol thx but that wasnt the prob (i know that, i just picked wrong). For some reason "big bad vodoo" didnt work as dummy spell, changed it into feral spirit with 0 duration and now it works fine.... except one thing:

problem 2: when i use "wait 20 sec" and "remove invis from picked unit" it doesnt work. So i tried making a unit group array with size 7 (number of the players who can have this hero) and then did like this:

Stealth
Events
Unit - A unit Begins casting an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Stealth
Then - Actions
Unit - Remove (Summoned unit) from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Stealth for (Casting unit)) Equal to 1
Then - Actions
Unit Group - Pick every unit in (Units within 800.00 of (Position of (Casting unit)) matching ((Owner of (Matching unit)) Equal to (Owner of (Casting unit)))) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to StealthUnits[(Player number of (Owner of (Casting unit)))]
Unit - Add Permanent Invisibility to (Picked unit)
Wait 20.00 seconds
Unit Group - Pick every unit in StealthUnits[(Player number of (Owner of (Casting unit)))] and do (Actions)
Loop - Actions
Unit - Remove Permanent Invisibility from (Picked unit)
Else - Actions
Else - Actions

The units in area GAIN invisibility, but never loose it. Whats wrong this time?

nvm i fixed it in another way; when the units attack they loose the invisibility.