How would i make it so that for every second an ability (lets say big bad voodoo) is channeled, it casts another spell? i have the dummy spell and hero skill already created, tried messin around with some triggers n such, but didnt have much success.
1. event - spell cast (or u can use begins channeling if you wish...) set SpellEnd = false set IntegerVar = 0 loop do the dummy thing here... wait for condition ( IntegerVar == 5 or SpellEnd == true) checking every 1 second set IntegerVar = IntegerVar + 1
2. event - unit ends channeling set SpellEnd = true
just make a trigger that orders a dummy to cast a spell every sec. turn it on when the hero begins channeling and turn that trigger off when the hero stops channeling. no vars needed
thanks pask, actually ramza the way my map is set up (like dota) i would have to make some variables if i did it the way you were talking about too, i just did it his way cuz i had a template
and actually, what i tried doesnt repeat, and i pretty much copied what you put pask, although for the loop thing dont you have to do like: for each intager a do multiple actions, thing?
and yes Ramza you're right about the integer thing... i just needed it to my spell, but it's not neccesary. however, if you do this thing with turning triggers on and off, you need more variables...
(sorry for posting these jass scrips here, but maybe sometime you will realise how easy the things go with jass...)