I've leraning some this last days and managed to modify and do some easy scrpits, but when it comes to spells, my final objective, i have an idea on how to do it, first i should BH to check that the hero is casting the spell, and check all the variables and store them (the target, what is he doing, etc)
But i don't see how i should make the script trigger, any help?
I would like start trying to script stoneskin
I would like it to give Defense=Spellpower,
if i could see how it's doing once with stonesking i could easly maange to realize how to do it with most similar spells (bloodlust, bless, etc)
Scrpiting spells
Re: Scrpiting spells
Whenever a stack takes an action or a hero casts a spell, the BG trigger occurs. You can check the action with the BG receiver's A command. There are other BG commands that will help you determine which stack is active, which spell is cast and which stack is the target.Pollo2002 wrote:I've leraning some this last days and managed to modify and do some easy scrpits, but when it comes to spells, my final objective, i have an idea on how to do it, first i should BH to check that the hero is casting the spell, and check all the variables and store them (the target, what is he doing, etc)
But i don't see how i should make the script trigger, any help?
I would like start trying to script stoneskin
I would like it to give Defense=Spellpower,
if i could see how it's doing once with stonesking i could easly maange to realize how to do it with most similar spells (bloodlust, bless, etc)
Then you could use a BM receiver command to modify the defense of the target stack (for example).
- Fnord
First i suppose i need to get a function trigger when a hero cast the spell stonesking.
The function would need to recolect the information on wich creature stack the stonesking i casted on, after that i just need to replace the defense of the creature with my formula.
i don't know how make it trigger, plus i have a problem with the BH function i don't know where i have to put the 1 or 0 for the side
The function would need to recolect the information on wich creature stack the stonesking i casted on, after that i just need to replace the defense of the creature with my formula.
i don't know how make it trigger, plus i have a problem with the BH function i don't know where i have to put the 1 or 0 for the side
Who is online
Users browsing this forum: No registered users and 4 guests