| 06-17-2004, 09:11 PM | #1 |
I'm working on a trigger spell for my AoS. When cast, it creates a sentry ward at the target location which looks like a cloud. The caster and any allied heroes are supposed to be invisible as long as they are inside this cloud ( = within 500 of the sentry ward). I though this was easy, and made some triggers in a few secs that i though wud work. But nope, i just cant make it. I'ev tried at least 5 different ways of making this, but none of them work perfectly (allways something wrong: They never loose it, they only gain it a short time etc.) but now i've finally come up with a trigger im 99% sure that it SHOULD work. But still, it doesnt. So here is the trigger, i will explain some of the variables and how its supposed to work below: Code:
Mystic Cloud Aura
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units of type Cloud) and do (Actions)
Loop - Actions
Set SP_Mystic_Cloud_Ward = (Picked unit)
Unit Group - Pick every unit in (Units in (Playable map area)(((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Rect centered at (Position of SP_Mystic_Cloud_Ward) with size (500.00, 500.00)) contains (Picked unit)) Equal to True
Then - Actions
Unit - Add Permanent Invisibility to (Picked unit)
Unit Group - Add (Picked unit) to SP_Mystic_Cloud_Group
Wait 0.10 seconds
Unit Group - Remove (Picked unit) from SP_Mystic_Cloud_Group
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is in SP_Mystic_Cloud_Group) Equal to False
Then - Actions
Unit - Remove Permanent Invisibility from (Picked unit)
Else - ActionsOk it picks every unit of the type cloud (modified sentry ward). Then sets a unit variable to the picked unit (as you cant use PICKED unit twice, as i wud have to otehrwise). Then it picks every hero on the battlefield and checks if it is within range of this variable ward. If it is within range, it gives it permanent invisibility and adds it to a unit to a unit group. But if it is NOT within range of the variable ward, it removes invisibility if the unit is not in the unit group. SO the unit group is to prevent the unit from loosing its invisibility because its within range of ONE ward, but not of another. Any suggestions of what is wrong?!? |
| 06-17-2004, 09:25 PM | #2 |
Code:
Mystic Cloud Aura
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units of type Cloud) and do (Actions)
Loop - Actions
Set SP_Mystic_Cloud_Ward = (Picked unit)
Unit Group - Pick every unit in (Units in (Playable map area)(((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Rect centered at (Position of SP_Mystic_Cloud_Ward) with size (500.00, 500.00)) contains (Picked unit)) Equal to True
Then - Actions
Unit - Add Permanent Invisibility to (Picked unit)
Else - Actions
Unit - Remove Permanent Invisibility from (Picked unit) Else - ActionsI think that will work. I'm assuming that you cannot have more than one cloud. No need to add the heroes to a unit group. Your mistake was obvious to spot out you removed the units from that group and then the next second they lose the ability. |
| 06-17-2004, 10:08 PM | #3 |
Ah no i made this working with 1 cloud, but the whole idea with the spell is that you can create many clouds (5 max considering cooldown and duration) and move invisible short distances that way. This trigger picks every cloud (= repeats trigger that amount of clouds) and does it. The unit group the heroes are added to are made so that they dont loose their invisibility becase of the repeats of the trigger, so they dont loose invisibliy when they are nearby ONE cloud, but out of reach of another. Get me? So i need it working for at least 5 clouds =/ |
| 06-17-2004, 10:09 PM | #4 |
You could also have the ward emit an aura and then pick every unit with that buff and give it the ability. If the unit doesn't have the buff, remove the ability. |
| 06-17-2004, 10:31 PM | #5 |
Yep thats one of the 5 tests i did. The problem here is totally unknown to me, the ward did have the aura, but none of the units got it. I even tried using a totally un-modded devotion aura, but no units got it. I tried removing the wards locust ability, its "bugger" model, etc. but nothing happened. I've also tried removing its special classifications, like summoned and ward. Still nothing. So either i need help fixing up the trigger, or help adding an aura to the ward. I have no idea what cud be wrong with that... You know how to fix that? If you just know how to add the aura, i cud easily fix the triggers for it! |
| 06-17-2004, 10:36 PM | #6 |
Turn a creep with an aura you are not using into the ward and summon the creep? If that doesn't work then something is totally wrong. |
| 06-17-2004, 10:50 PM | #7 |
Ah yes i could use a hidden caster and replace the ward... lol i didnt really think of that =) Thanks ill add rep, that is 100% sure to work, otherwise WEU is bugged (weu IS bugged but heh... anyways :D) |
