| 05-24-2011, 03:36 PM | #1 | |
this spell razor gale. i like it tons. but i had a fun idea for making a double of a hero go around doing the things the hero did. basically everything the hero does, the double will do. movement, attack, spell casting, all automatic. but razor gale does not get casted. can you figure out why and how to fix it?
|
| 05-24-2011, 04:42 PM | #2 |
Does the double have the exact same ability as the hero? Does the double have enough mana to cast it? Can you also post your code for mimicking the hero's actions? |
| 05-24-2011, 06:17 PM | #3 | |
ah, that was a somewhat quick reply. i was hoping you'd look at the spell. the code i wrote to mimick the actions is nothing intersting. and fyi, it's in cJASS. i can turn it into vJASS if you want. you shouldn't need me to though to get an idea as to what i'm doing.
i'm guessing if i added some delay to the mimicking, then razorgale would get casted. but there shouldn't have to be one. right now i'm testing to see if having the dummy cast the spell using a copy of the scope would work, as someone implied i should try out. but that imo would be a clumsy work-around and the real problem wouldn't have been fixed...lol it highlights some of the code in red. haven't seen that. edit, hmm unless i made a mistake then that isn't working either(duplicating scope and ability) i'm going to run debug script on the hero and double and see what it says. hmm...debug isn't showing any discrepency...i mean it only shows one order issued which must be the caster issued the order it shows it like all the other orders. the major difference being that for whatever reason, the double is NOT getting the orders issued to it. other spells it shows the double performing them and debug shows them issued the order. so i guess we can confirm the double isn't getting an order and trying to do it and failing. the double doesn't seem to be getting any order at all. which we already knew. but the point is that the order issued to the caster is plainly visible, so idk why it isn't being carried over to the double. i suspected all this, but i can't explain it. i didn't write the spell, so i'm not sure why it appears to be non-MUI and i don't know how to fix it. it even puzzles me further that duplicating the scope with new raw codes and abilities to match doesn't alleviate the situation. edit: adding another line to debug code to check if point is being lost somehow when usin rzrgale..ya the point isn't lost so idk what the prob is and ya ofc the double has mana it's not that the double can't cast the spell, it's that it's not being casted automatically... |
| 05-24-2011, 07:46 PM | #4 |
If the double is not getting orders issued to it then that's not a problem with the code of Razor Gale (which is MUI), since that code only runs when the unit casts the spell which happens after it is issued an order to cast the spell. If this is a learned hero skill, are you sure the double also has it learned? Edit: try giving the hero a different ability instead of the Razor Gale custom ability. For example, give your hero Pocket Factory which is also a point-target ability, but shows a projectile so it's quite easy to see it it was cast or not, then use the ability ingame and see if the double also uses it. If not, then there is clearly no problem with the Razor Gale code. |
| 05-24-2011, 08:23 PM | #5 | |
Quote:
edit: yes in case you're wondering i'm trying pocket factory and it's working flawlessly, along with others here's a test map if you really want to confirm it that badly. note: "-lvl" as chat command will levelup your hero to level 6+. the hero in question is the red warden-looking hero with the sword near the red warden |
| 05-25-2011, 02:09 PM | #6 | |
Quote:
I Tried switching the triggering abilities for the Birds spell and the Razor Gale: the first ability order got copied same as before, so now both heroes used razor gale (only it didn't go anywhere because the birds spell didn't have a channeling duration) and the second ability order didn't get copied, so now Birds no longer worked for the duplicate hero. So, the problem is apparently in the triggering ability for Razor Gale, not the code, try switching it to some other targeted channeling ability and see if it works. |
| 05-25-2011, 03:57 PM | #7 |
your code uses language that is very alien to me, i don't understand it, so how could i know 100 percent it is MUI? i'll try figuring out if the problem is with the object in object editor... edit: the spell seems to be working ok with rain of fire. |
| 05-25-2011, 06:38 PM | #8 |
Apparently something in the original triggering spell made its order not get copied. I'm as baffled as you are by this, I would try experimenting with it to see if I could find the reason but unfortunately cjass is very alien to me so I couldn't do anything with your order-copying code. I guess as long as you found a different triggering spell where order copying works, this isn't such a big problem any more. |
| 05-25-2011, 06:55 PM | #9 |
well it's a large map with a ton of triggers, so it was probably hard for you to find the 3 relevant triggers... fudo, DebugS and MSGS fudo is the hero abilities and debugS is the debugging stuff, which uses msgs... the map is a really long way from being finished so it's not easy to navigate the triggers atm. |
