| 06-22-2006, 04:48 AM | #2 |
Just to let you know, you don't have to null global variables. So that custom script line at the end really doesn't do anything useful. Also, use "Starts the effects of an ability" for the event, not "begins casting". However, that isn't something that would stop it from working more than once. Make sure the ability based on Bloodlust is able to level past 1. Also make sure that its able to be cast on ANYONE (Allies and enemies), since you spawn the dummy for Neutral Hostile and most (If not all) players are enemies of Neutral Hostile. |
| 06-22-2006, 04:53 AM | #3 |
I've done everything you pointed to check for, so maybe I just need to re-check everything and make sure I didn't do anything wrong. Why would I use "Starts the effect of an ability"? Where is the difference inbetween the two? Also, I don't think my spell actually has an effect, but I may be mixing things up here. The Bloodlust ability I made has 6 levels in it, but does the Dummy unit have to have levels or something? I'm actually not even sure if the spell casts once. I have to watch my tests closer. I'll let you know what happens. |
| 06-22-2006, 05:05 AM | #4 |
A common issue when using something like Trigger: ![]() Unit - Order DummyUnit to Orc Shaman - Bloodlust (Triggering unit)![]() Unit - Remove DummyUnit from the gameTrigger: Unit - Add a 1.00 second Generic expiration timer to DummyUnitTrigger: Unit - Set level of Commander Rage BL 1 for DummyUnit to (Level of (Ability being cast) for (Triggering unit)) |
| 06-22-2006, 05:11 AM | #5 |
Ok, 6 quick waits coming up. I'd rather use waits to be postive that the spell is cast. I'll pop them in and test. Edited it, nothing happened. In fact, bloodlust is never even cast, ever! Here's my map, if that helps anything. Feel free to poke around the heroes and things. The units on the map were for testing the 2 heroes I've gotten done (which aren't done anymore becasue of new-found spell triggering skills) The Arthas hero is the one who is giving me trouble. Just test the map and learn "Commander Rage" to any level and try it out. EDIT: gotta re-edit, hold on. I'll re-upload in a minute. EDIT EDIT: Done, it can be uploaded now, maybe you can find the mistake. I suggest looking at my dummy unit (it's a wisp, thusly named dummy unit in the object editor) and then the spells (commander rage and commander rage BL 1) Thx in advance, + rep and creidts if you can find the problem. :D |
| 06-22-2006, 05:42 AM | #6 |
There are some nice dummy unit systems for taking care of the handling. Give this a shot. I would imagine there is also one built into vex's caster system. Actually I'd add a little something like JASS:function TACleaner takes nothing returns nothing call TriggerRemoveAction(GetTriggeringTrigger(),ItoTA(GetStoredInteger(GC(),I2S(HtoI(GetTriggeringTrigger())),"ta"))) endfunction function SpellFinish_cb takes nothing returns nothing local trigger t = GetTriggeringTrigger() local string key = I2S(HtoI(t)) if(GetStoredInteger(GC(),key,"spellid") == GetSpellAbilityId()) then call ExecuteFunc(GetStoredString(GC(),key,"action")) call ExecuteFunc("TACleaner") call FlushStoredMission(GC(),key) call DestroyTrigger(t) endif set t = null endfunction //When unit u finishes casting spell spellid, action is called with some data on GetTriggeringTrigger() //"spellid" holds spellid and "unit" holds unit function OnSpellFinish takes unit u, integer spellid, string action returns nothing local trigger t = CreateTrigger() local triggeraction ta = TriggerAddAction(t,action) //Jass gives T&A a really bad name local string key = I2S(HtoI(t)) call StoreInteger(GC(),key,"ta",HtoI(TriggerAddAction(t,function SpellFinish_cb))) call StoreInteger(GC(),key,"spellid",spellid) call StoreInteger(GC(),key,"unit",HtoI(u)) call StoreString(GC(),key,"action",action) call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_SPELL_FINISH) set t = null set ta = null endfunction function DummyCleanup takes nothing returns nothing local string key = I2S(HtoI(GetTriggeringTrigger())) local unit dummy = ItoU(GetStoredInteger(GC(),key,"unit")) call ReleaseDummy(dummy,0.) set dummy = null //Not actually necessary since we don't deallocate dummies endfunction function CleanDummyAfterSpell takes unit u,integer spellid returns nothing call OnSpellFinish(u,spellid,"DummyCleanup") endfunction |
| 06-22-2006, 05:51 AM | #7 |
Right, well, before finding out that your wisp had 0 max mana and blood lust costed 1 mana I played around a bit:changed targets allowed to default and the dummy is now created for the owner of the unit casting the spell Edited the Dummy unit (I set pretty much everything to 0) so there would be a minimal delay between the roar and the bloodlust Shortened the code hope it's what you wanted :) |
| 06-22-2006, 06:02 AM | #8 |
What I would do is create 6 different units rather than relying on making them level their abilities...but that's just me. |
| 06-22-2006, 11:30 AM | #10 | |
Quote:
Trust me when I say making one unit and leveling the ability is better. |
| 06-22-2006, 11:31 AM | #11 |
@aquilla: I originally had bloodlust set to 0 mana, I thought that I had also set the dummy unit to having mana before that. Hmm. Anything that helps the map, I don't really care what is changed, as long as it's for the better. I'm gonna try and solve some of my problems with spells and then come here so you don't have to hear my complaining. :D @CaptainGriffen: Thx for the code, if it's not alreayd in my map after Aquilla fixed it, I'll compare them and maybe insert yours depending. Thank you all so much for the help, especially Aquilla. +rep, and I'll put you in somewhere in the loading screen as a speical thanks. If you liked what you may have seen, if somehow I get into a beta stage, you can test if you'd like (it's gonna need it). I expect theres gonna be alot more posts with my problems in them, but that'll slow down some once I grasp the full capabilities of the WEU! I used the If/Then/else fuctions becuase I had basically just gotteb hold of what they could do. I'm gonna test my map out now and work on some more spells, hopefully these ones will work. Wish me luck, you'll be hearing from me soon (trust me) :D |
