| 05-08-2006, 05:10 PM | #1 |
Hello guys.. I found a "bug" which I really need some way to fix.. I'm making some illusions, and need to give them an ability, but I can't do that.. You guys know anyway to fix that? Btw. A blue colored unit won't help me in this situation. - Soultaker |
| 05-08-2006, 05:18 PM | #2 |
You have to refer to the Gameplay constants for them. W/E --> Advanced --> Gameplay constants --> Illusions Im think its the Illusions bestow auras, your ability might not be a aura, but im sure this boolean either disables all abilities or dosent. But this will effect all illusions and not just the ones you want it too effect |
| 05-08-2006, 05:32 PM | #3 |
Don't make it an illusion. Use another unit that is a summoned unit, but not an illusion, as illusions are always blue coloured. |
| 05-08-2006, 07:09 PM | #4 |
Why wouldnt a blue unit help you? (you can color units differently for each player). Cant find another reason, ill tell you if you want how to, if tidehunters thing doesnt work that is. |
| 05-08-2006, 07:14 PM | #5 |
The)TideHunter(: Thanks for the response! Sadly, it didn't work.. Captain Griffen: You totally missed my point.. So everyones clear about this.. I'm casting illusion on a random unit, and as I don't want to make an additional unit for each unit, I'm not gonna use a bluecolored one. I want the illusion to have an ability (and be able to use it..), but that seems some how hardcoded. Anyone know how to solve this? Edit: The unit can have abilities, but they are only the passive ones that the target got. - Soultaker |
| 05-08-2006, 07:56 PM | #6 | ||
Quote:
Quote:
Apt solution, I feel. |
| 05-08-2006, 08:11 PM | #7 |
Sorry, but I have no idea what "apt" means.. Guess it's something like "nothing else you can do then.." or something like that. - Soultaker |
| 05-08-2006, 08:17 PM | #8 |
Provides exactly what you are looking for, more like. You'll probably have to make copies of the heroes, but won't have to for the normal units (just give them a timer, and add the 'summoned' classification). |
| 05-08-2006, 08:50 PM | #9 |
Animation - Change vertex color on unit Something like that a function exists. That means you can color a unit with triggers, solving your problem 100%. |
| 05-08-2006, 09:24 PM | #10 |
No, because illusions appear blue only to one player (and his allies). I have a feeling that may be hard coded. |
| 05-08-2006, 10:56 PM | #11 |
You can't use a localized Set Vertex Color function? Or will that desync? I think as long as it's only visual and doesn't actually change anything, it won't desync, so it seems like that should work. |
| 05-08-2006, 11:02 PM | #12 |
Yeh you can use GetLocalPlayer(). I did the same thing to create a custom waypoint system. JASS:local unit u = GetTriggerUnit() if GetLocalPlayer() == GetOwningPlayer(u) call SetUnitVertexColor(u, 200, 200, 255 ,255) endif Or something like that. Thats not the exact code, but its pretty close. |
| 05-09-2006, 05:36 AM | #13 |
You're missing a then, I guess that would make your code crash. -- What I would do, is to make it a dummy ability instead (means that it does not summon any illusion), and then with triggers detect when it is cast. Now when it is cast, store the target unit in a gamecache using the StoreUnit native, and then restore it using the RestoreUnit native. When it is restored, you will have a 'copy' of the original unit, so all left to do is to add an expiration timer and change the vertex color locally. |
| 05-09-2006, 05:47 AM | #14 |
Missing "then"s don't cause crashes. |
| 05-09-2006, 01:47 PM | #15 |
EDITED: Thanks Blade! Works completely.. Anyone know a smart way to remove all "non-normal" abilities from a unit? (all except attack, move etc.) - Soultaker |
