Mystic Software Forums
Mystic Software => General Discussion => Topic started by: Ichigatsu on December 26, 2005, 10:51:27 AM
-
I was woundering if womeone has the code to create reflect like from Final fantasy or something.
-
I forgot, for the people who don't play FF. It's when an enemy cast a spell and the damaged is reflected back to the enemy.
-
Sounds like you'd need every spell to check whether the target has the reflect status. Don't think you can do that with the default battle system.
-
You CAN do it with the default battle system but it would take a while. Like Xorlak said you would need to check if the character has reflect. Instead of doing damage to the target it will do damage to the source.
-
Oh it could be done. I'd just involve a bunch of #ifs and such in every special move.
I'd probably be something like this...
if reflect!==1
(
givehp(-50, source)
)
if reflect!==0
(
givehp(-50, target)
)
I didn't test that, and I haven't touched RPG Code in months, but it think it?d work like that, unless they went and changed it on us.
-
No, no. Just reflect! won't work.
This is the program that will run when the status effect is set...
Reflect[SourceHandle()]! = 1
Really quite simple. As you may imagine, when the status effect goes away, this'll have to be set to zero, or killed with Kill(). Every reflectable special move would need to have this code in it, and not do any damage as far as what you see in the special editor is concerned:
Switch(Reflect[TargetHandle()]!)
{
Case(0)
{
GiveHP(-100, target)
}
Case(1)
{
Wav("reflect.wav")
GiveHP(-100, source)
}
}
The wave file is just something I thought would be nice. A reflecting sound may be a good idea.
I do believe this code is correct, for the most part. I'll come back if it's not, or if I missed something.
This code is assuming you're using TK3. Are you using TK2? I can post alternate progs if you are.
-
Yes, I'm using TK3. Thanks everyone for the codes on reflect. I'm going to try them out after I'm done with all my homework. ^__^V