| 03-22-2007, 05:13 PM | #1 |
Hi. I made a trigger that cast Tornado permanent slow aura on unit to simulate fatigue. It is a corner stone of my rpg I find. I have many morphing spells and when my units morph lets say from werewolf to human, they lose their fatigue(slow aura). I need to keep this slow effect. DO you have any suggestions. Making a trigger for each morphing would be too much, I would need eitheir an alternate spell that won't buff out on morphing or a more general trigger. Thks |
| 03-22-2007, 07:49 PM | #2 |
The simplest (but not necessarily the easiest) answer is to make a master anti-bug trigger. All you do is have it detect when the unit casts any of the shapeshifting spells, it reapplies the fatigue buff. Trigger: Fatigue Anti Bug
Another option is to nest this within each trigger-driven shapeshift, so that within the trigger of the spell it reapplies the fatigue buff. For future reference, make sure you say what spell these abilities are based off of and how these triggers work. It always helps those who help you. |
| 03-23-2007, 04:32 AM | #3 |
... Ever tryied actually addin the abiltity? To the k=morhpin unit (polymorph you'll have tooo or use hex instead) -Av3n |
| 03-23-2007, 03:06 PM | #4 |
That is what I am doing. But the worst is that I have like 7 different morphing types; and that the slow aura is cast upon a game time event to a different time depending on the race of unit. Imagine the problem of making an anti-bug trigger after that. |
| 03-23-2007, 03:36 PM | #5 |
You've hit one of the parts of map-making (and game design in general) that grinds it to a halt. You encounter a bug or feature that you had not intended before, and the only way to fix it is to revamp or rework everything you have done already (effectively doubling your work). Unless someone can come up with another solution (showing how your triggers work always helps), this is probably one of those annoying things where you have to put in alot of work just to keep one feature. You may have to end up using a new system to implement your shapeshifting. Once again, looking at your code would help those who can assist you alot with figuring out what to do. You may find at a later time you not only want to add a fatigue effect, but also a well-rested or well-fed type effect, which means you will have to do alot of work to copy/paste this for each effect. An example would be team colors of WC3. Let's imagine that blizz didn't think to have team colors when they started programming. They get about 50 units made (graphics and all) and they realize they want to make team colors. They have one of two options: make a special skin for each unit depending on the teams color (very innefective but simplest), or rework how skins are done so that certain areas are designated as "affected by team color." Which is not as easy as saying "make this area blue if player 2" because the graphics are much more complicated than that. i.e. Blizz had to create a new system for skinning. At either rate, Blizz will have to do alot of work just for that one feature, simply because they did not forsee a need to use it until partway in. |
| 03-23-2007, 08:25 PM | #6 |
call UnitMakeAbilityPermanent(unit,true,abilityid)
Edit: to clarify, just call that on the unit (use custom script with globals if you have to) and the ability won't be removed when morphing |
| 03-24-2007, 01:24 PM | #7 |
I love you blu_da_noob. But I am like absolutly ignorant on how to custom script. I seems fairly a small command has you put it. Can you make it for me. I guess the problem would be to find the ability id. SO or else can you tell me how to adapt this line to my maps. But again we are not sure it would work when morphing. Thanks a million times if it is not to complicated a task for you. About your comment Castlemaster. I share your toughts. |
| 03-24-2007, 01:31 PM | #8 |
In GUI, make a new custom script block, like this: Trigger: Custom Script:And then add the line "call UnitMakeAbilityPermanent(unit,true,abilityid)" Then replace the parameters with the approipate values. The unit would be a global unit. You could maybe set a variable to the unit, then use the variable as the global, true is fine as it is, and to get the ability id, you simply go to the object editor, go to view at the top, and click Show values as raw data. It then has the abilities rawcode next to the ability. These look like letters/number but are actually a integer (number). Wrap these around single quotation marks (') like for example, Locust, is 'aloc'. So something like this: Trigger: ![]() set MyGlobalUnit = MyUnit
![]() Custom Script: call UnitMakeAbilityPermanent(udg_MyGlobalUnit,true,'yourid') |
| 03-24-2007, 01:37 PM | #9 |
Create 2 global variables, one called Unit (of type unit) and one called Ability (of type ability) (capitalisation matters). Then in your trigger you'll do: Trigger: ![]() Set Unit = (Triggering unit)
![]() Set Ability = Acid Bomb
![]() Custom script: call UnitMakeAbilityPermanent(udg_Unit,true,udg_Ability) |
| 03-24-2007, 01:40 PM | #10 |
OK thanks alot. I will study this a bit to process all the info. I will let you know if it work. |
| 03-27-2007, 04:58 AM | #11 |
Ok I went by the book. I have tried a few things, but still this script don't work. I am grateful for the time you took. Obviously your custom script seems well written so I am starting to believe it is simply impossible to morph and retain an added ability. So any suggestions left? |
| 03-27-2007, 05:07 AM | #12 |
The whole intention of the native is that abilities don't get lost after morph. So you ARE doing something wrong. To point out possible causes: - Calling SetUnitAbilityPermanent before actually adding the ability - Using wrong unit in SetUnitAbilityPermanent - Using wrong abilityid in SetUnitAbilityPermanent |
| 03-27-2007, 03:27 PM | #13 |
OK, I will take a second look, maybe I called the Set ....Permanent before actually adding the ability. If it still don't work I will post exactly what I did. Thks |
| 03-27-2007, 04:35 PM | #14 |
It works It works !!! Yep that was it. I had put the Set Permanency call before adding the ability. This truely took me out of a dead end. Yeah! |
| 03-27-2007, 07:40 PM | #15 |
In future, please edit your posts instead of double posting. |
