| 03-09-2007, 05:05 AM | #1 |
Anyone have the slightest notion why Dark Portal (ANdp) has no orderid, yet there is the orderid "darkportal"? How might one go about ordering a unit to cast it? Additionally, why do Shadowstrike and Soulburn not give credit for kills if cast via dummy units? If I add a dummy spell based off of either one to a hero, and then order it to kill a unit via it, the hero will get credit. If I instead create a dummy unit and order it to use the spell, no credit is given. Lastly, is there a way to get the amount of money a player has been awarded for killing a unit? If, for instance, a player kills a footman which then gives him 10 gold (all done through the game engine and OE, obviously. Not trigger based); can I get that value? |
| 03-09-2007, 09:04 AM | #2 | |
Quote:
I hope it helps :) Cheers. P.S: for your second question, does the event "A unit dies" happen AFTER of BEFORE the bounty? If it happens before, you can notice the variation of the player's gold after 0 second. |
| 03-09-2007, 12:39 PM | #3 | |
Quote:
Of course they do... But they wouldn't if you remove/kill the dummy before the spells end. |
| 03-09-2007, 12:48 PM | #4 |
In order to give bounty, shadow strike's casting unit must satisfy two conditions: -it must be owned by the player whose bounty should be assigned to throughout the duration of the spell (or until the target dies), this sometimes isn't satisfied if you happen to recycle dummy units. -it must be alive. |
| 03-09-2007, 11:31 PM | #5 |
Wow, you guys know a lot. If I knew everything, I'd be able to conduct the perfect WC3 map and make the ultimate formula that uses numbers and variables to figure out the meaning of life for YOU. |
| 03-10-2007, 08:31 PM | #6 | |
Quote:
+Rep to mazda70 and Vexorian! |
| 03-13-2007, 03:33 AM | #7 |
Erm, I have a slight problem. I have created the spell via the CasterSystem, version 12.8 (I started the map with v12.8, and I don't want to have to redo all the abilities). The reason no credit is given is because the CS dummies have changed ownership (maybe I don't understand how the CS works...). How might I recitfy this? I know I could just add the dummy units to an array, and kill them all after the spell has ended, but since this is from the CS, I can't exactly do that, right? |
| 03-13-2007, 06:39 AM | #8 |
call RecycleCaster() is useful.. |
| 03-13-2007, 02:36 PM | #9 |
Any dummy unit casting shadow strike must either be recycled (back into the caster pool) or killed/removed after the spell effect duration has passed. The easiest thing would be to give each casting unit an expiration timer whose duration matches the one set in the ability editor for the respective spell. It won't return to the caster pool this way, but it's the safest and less troublesome method IMO. |
| 03-13-2007, 03:53 PM | #10 | |
Quote:
Masda, how is not recycling casters "safer" or less troublesome? |
| 03-13-2007, 07:17 PM | #11 |
I'm just retarded. I totally missed line of the Readme. |
| 03-13-2007, 08:49 PM | #12 | |
Quote:
Perhaps because you don't need to use a timer+cache just to make a dummy unit usable again after X seconds. I used 'safest' because of the fact that the method used can easily cause more trouble than the alternative method if not used properly. In any case, wouldn't it better to create new casters either when the spell is cast or when they are later needed, and then just let the casting units die? If the duration is quite long, and you happen to do a lot of caster usage during that period, the caster pool could unnecessarily grow big in size. You probably know the advantages of recycling casters better than I do, but you might agree that depending on the availability of the caster pool (stack size+usage per minute) you will be tempted to choose one option rather than the other. Of course this does not consider that your alternative was made handy in a compilation called CS and that an expiration timer can take only one function call. The last decision is just a matter of opinion. |
