|
Post by Rodak on May 4, 2005 8:13:28 GMT -5
I have been making the abilities, items and skills unique to my game and have been doing a lot better lately! I have not asked a dumb question for days!!
But now I am trying to create a direct effect that involves getting data about the enemy during the characters turn. I want to allow the player to see the enemy's current HP. So far I have managed to display the player's HP and random HP of other members, but as usual, I have trouble targeting the enemy during the player's turn. I tried using "Make Active Character" but I think I need a flag. The ones I want to use are not able to be modified with the Data command.
I actually worked on this for a while and feel I must be missing something obvious again. Any help would, as always, be greatly appreciated.
Peace.
|
|
|
Post by Dungeon Warden on May 4, 2005 12:10:10 GMT -5
It would seem the easiest way to do this is to use a regular attack direct effect and modify it so that instead of using the battle formula the script displayed the enemies stats on the screen.
Once you target an enemy with a direct effect, all you need is:
Make Active Character Subsitute Attribute for Variable Display: HP Make Active Character
Another way to get enemy stats is with the Who Goes Next command. This command lets you cycle through the targets and get their info.
If you wanted to display all enemy's HP:
Battle: Check who goes first Script Branch: Repeat: Flag (Member Check) Off (not at the end of the list) Script Branch: Condition: Flag (Instigator Side) On (enemy's side) Battle: Substitute Target Attribute For Variable Display: HP Script: Condition End Battle: Check Who Goes Next Script: Branch End
I hope that helps.
|
|
|
Post by Rodak on May 4, 2005 13:01:34 GMT -5
I think, based on your first script, that I may be doing something extremely dumb (again). It looks exactly like what I scripted the first time. Although I think I called for the variable and am not sure if the Display:HP command was tried. I'll look for it.
I may have the script in the wrong place. I'll post what happened tomorrow.
It's something to do after work! (I don't have a social life) (I work 7 to 7... there's so little time!).
Many thanks, I like the second script better anyhow. I was waiting to get it right for one character before I tried for more (got to take these things one step at a time).
Peace.
============== NEXT DAY RESULTS: ==============
I think this is going to have to be a weekend project. I got some amusing results last night after work and this morning before.
I did call the HP I wanted (Once again Dungeon Warden proves he deserves a mention in my game credits!) (thanx!), I also got the "damage" reaction from the enemy and it even kept going and showed the party's HP and did the "window shake" indicating it hurt them! No damage was dealt to either enemy or party.
I must have been suffering from "Brainfart" because I could not effect this aspect. More evidence of Cerebral Crepitations comes from the fact that I could not even make the text around the displayed HP show what I wanted. I guess I just had an off day (night?).
I feel sure that I'll be able to resolve it when I can put in the necessary time. Of course if you know what's wrong off the top of your head it would save even more time for me, but I have enough to finish from here. I think. If not, I'll be sure to ask for even more assisstance!
Thanks again for your help.
Peace.
|
|
|
Post by Dungeon Warden on May 5, 2005 20:29:13 GMT -5
Brainfart I think I see what's going on. The problem is you used an existing direct effect and didn't remove some of the stuff attached to it. I'm sure you'll figure it out when you have the time to look into it. Good luck.
|
|
|
Post by Rodak on May 6, 2005 7:19:19 GMT -5
Actually, I was working on making the effect from scratch and thought that was the problem!
I now blame it on putting the script in the wrong "slot"... bloody file sharing systems!! There are so many trees up which to bark, and I am such a bad doggy, that I sometimes get lost in the forest just barking.
Eventually I learn something though.
|
|
|
Post by Dungeon Warden on May 6, 2005 9:43:59 GMT -5
Yeah, I know there are a lot of slots. That's one reason I make the extra effort to put a full description of the Direct Effect slots in my FAQ. There is even a section which states:
Result / Success – This is what happens if the direct effect is successful. Note: this is the only slot you need to use. You can make a direct effect with all slots empty except this one and it will work fine.
I should add that you still need to set up other things like targeting, but as far as scripts go, this is the only slot you need to use.
|
|
|
Post by Rodak on May 6, 2005 11:55:13 GMT -5
Actually I was referring to your FAQ at the time! I printed it at work and took it home. It's usefullness cannot be overstated!
I am not there, but I think I was using just the one script and put it in success as well as fail, as that seemed a good step to insure success (even though the success rate was set to 100%).
I am beginning to suspect that the "Damage" enemy action is a default reaction for a successfull targeting and may need to set a flag and modify something (with a script branch condition) in the script that calls for this reaction only if the flag is off.
I had to do something similiar to call for a specific enemy action as a reaction to a specific spell (sorry if that sounds confusing... just trying to state it generally... what I did was create an "enemy run away" action in the enemy action editor, set it at enemy action 7 {yes I could have used 6, but I have a Prime Number Fetish} and set a run away flag which wound up being used in an enemy trait script for a specific event battle... I do want to generalize it into the "Battle Formula" {probably the wrong name for it} for all enemies).
Oh yeah, does it matter if I set the effect to a spell, skill or item? I thought the effect would be identical regardless of what invoked it. But I've been wrong before!
I'm actually having a busy day at work here and gotta run! A welcome change of pace... I was starting to worry about this place!!
|
|
|
Post by Dungeon Warden on May 6, 2005 17:38:08 GMT -5
Enemy damage: That's right. You set the enemies reaction to a successful hit in script 40: Damage Enemy (or 41: Critical (enemy) in the case of a critical hit). This is where you could set a condition to change the action based on the type of attack.
Spells and skills are identical. The only difference is where they appear in the battle menu.
Item effects usually consume an item and therefore require an item to be used to activate it. Technically it is identical to spells and skills (everything is the same). The category just allows you to use item type commands. If you try to use an item direct effect outside of using an item, item 0 will be used. It the item is consumed, the player might find his supply of item 0 disappear unexpectantly.
|
|
|
Post by Rodak on May 6, 2005 18:02:08 GMT -5
If you try to use an item direct effect outside of using an item, item 0 will be used. It the item is consumed, the player might find his supply of item 0 disappear unexpectantly. Thanks for the directions to the Damage scripts. That'll save some hunting. But about the item bit quoted above, I actually have this effect on an item which has no consume script (never wears out... infinite uses... phrase it how you like). Am I asking for trouble? I made the direct effect (and item) from scratch so nothing pre-set should be interfering, I hope.
|
|
|
Post by Dungeon Warden on May 6, 2005 19:56:16 GMT -5
It the item never gets used then the script will run like any spell or skill with o cost. As long as you make sure the player has the item, you'll be fine. The only problem you might run into is if the player can use the ability without having the item.
All I meant in my previous post was that if an item needs to be consumed in order for the effect to work, then one will be reguardless of how the effect is activated. You could actually make a spell (or skill) that requires MP and an item to work. It gets as bit complicated, but it's workable. I have a few spells in my game that require items - some consumed and some not - in order for the spell to activate.
|
|