Scrpiting spells

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.

Moderator: Moderators

Pollo2002
Peasant
Peasant
Posts: 96
Joined: 24 Jan 2006

Scrpiting spells

Postby Pollo2002 » May 4 2006, 16:57

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)

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Re: Scrpiting spells

Postby Fnord » May 4 2006, 17:44

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)


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.

Then you could use a BM receiver command to modify the defense of the target stack (for example).
- Fnord

Pollo2002
Peasant
Peasant
Posts: 96
Joined: 24 Jan 2006

Postby Pollo2002 » May 4 2006, 18:08

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 :S

Pollo2002
Peasant
Peasant
Posts: 96
Joined: 24 Jan 2006

Postby Pollo2002 » May 4 2006, 18:11

i made the second post before reading your fnord, thanks for your reply i think i can work it around now, but i just got informed by you that the script may be a lost cause :'(


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 5 guests