| 10-21-2004, 10:20 PM | #1 |
Ok so ive been working on a way to simulate an ability being canceled when ordering it to stop doesnt work. For some odd reason I cant seem to figure out why this trigger is acting funny. Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Shroud of Night for (Casting unit)) Equal to 1
Then - Actions
Unit - Set mana of (Casting unit) to ((Mana of Casting unit) + 75.00)
Unit - Remove Shroud of Night from (Casting unit)
Hero - Modify unspent skill points of NightStalker: Add 1 points
Hero - Learn skill for Casting unit: Shroud of Night When this trigger is ran with the hero at full mana he will end up not adding any mana to make up for the cost of casting the ability. Whenever the spell is casted while the ammount of the heros current mana is above the heros max mana minus the cost of the ability, it will add mana up to the amount of the heros max mana minus the cost of using the ability. While if its below that its works properly. Ok its thats a little confuseing so heres examples of what i mean. the ability costs 75 mana, and the hero has a max of 210 mana when i test it. Current Mana 210 *casts spell* Mana = 135 Current Mana 210 - 135 *casts spell* Mana = 135 Current Mana 135 - 75 *casts spell* Mana = the correct amount Even though im looking into a better way to stop the spells it still bugs me that i cant figure out wats going wrong in the trigger I have the exact same trigger except with different values to give back the mana for another spell and it works perfectly. Perhaps its because its based of the Item Summon Furbolg ability? Though I can't think of how that would cause this. |
| 10-21-2004, 11:21 PM | #2 |
how would you stop a summon ability? I think the mana is lowered when the units are summoned, not when u start the summon, so thats why u dont get the mana back. Try a wait and it will work (ithink) |
| 10-21-2004, 11:41 PM | #3 |
as for stoping the ability its a dummy summon spell removing the ability and learning it again resets the cooldown and i add the mana they used back its not actuly stoping it it makes it look like it was stoped. As for a useing a wait, if it wasnt working at all that might have worked but the spell does work, it just wont reset the heros mana past a certain ammount. |
| 10-21-2004, 11:52 PM | #4 |
o_O im confused. What spell is the spell u want to stop based on (the hero spell), and what is spell that is used to stop it based on? |
| 10-22-2004, 12:06 AM | #5 |
Ok, here it is step by step for you, after the units casts the dummy spell based off the item ability called Item Furbolg Summon that summons nothing i do the following things. 1)Add the amount it costs to cast the dummy spell 2)Remove the dummy spell from the casting unit 3)Trigger relearning the the dummy spell to the casting unit(removing and relearning an ability resets cooldown) 4)Display error msg. Like i said before i dont stop the spell i make it so it looks like you never casted the spell. And im not tring to figure out how to stop it, im trying to figure out why the trigger will only add mana untill the casting unit has 135 mana and not add the rest. |
| 10-22-2004, 12:11 AM | #6 | |
Quote:
|
| 10-22-2004, 12:24 AM | #7 |
Um that would be the stop command, you know the one every unit has, you can order a unit to stop and with some spells it will cancle the spell. But with the spell im useing it doesnt work, I said that so i wouldnt get a ton of responses just telling me to order the unit to stop. |
| 10-22-2004, 12:38 AM | #8 | |
Quote:
|
| 10-22-2004, 02:29 AM | #9 | ||
Quote:
Quote:
|
| 10-22-2004, 02:36 AM | #10 |
you could try just using unit begins casting ability and then check if the level is equal to 1 if it is just order the unit to stop (because you set the cast time to .5) seconds. so this all takes place in that .5 second margin where you can still order the unit to stop without the ability doing nething. |
| 10-22-2004, 02:54 AM | #11 |
That doesnt appear to work with abilities based of Item Summon Furbolg or Windwalk. The question isnt how to stop the ability as much as why would the mana im adding act so weird. |
| 10-22-2004, 03:21 AM | #12 |
well, IMO 60% of all ability problems are because of timing. you said something like it urself (i think.) i think you said it works if the hero doesnt have full mana, well maybe it is adding the mana before the mana from the ability is actually taken. something that really helps is take all ur units with abilities, and set thier Art - Animations - Cast Point to 0 so that the ability is instantly cast. otherwise add a maybe 1 second wait to the begining of youre trigger and see if that works. |
| 10-22-2004, 03:35 AM | #13 | |
Quote:
Thats basicly how it works, its not that it doesnt work or it does, rather that it may add 1 mana instead of 75 or 65 instead of 75, and from what i guess The trigger adds the mana all at once so it should be adding it since it dose work it just wont add anymore mana after 135. |
| 10-22-2004, 09:26 AM | #14 | |
Quote:
(btw, your gold is 1337 :P) |
