Post new topic    
Metal Slime
Send private message
change global varibale if the hero is hit 
 PostWed Mar 06, 2013 10:01 am
Send private message Reply with quote
For a game I was planing to change a global varibale if the hero is hit by a certain attack.
Then reading the thread about „Changing Music during a battle“ made me wonder if this is possible at all. Surprised
So I looked throug the OHRs Attackbitsets and Enemystats and I think there was no option to run a script. Hopefully I just did not find it. Sad

I also looked up battlescripting in the wiki, I didn't even know that it existed until that moment... Grin

The Questions are:

1) Can I change a global varibale if the hero is hit by a certain attack in the OHR?
Or it this just possible without battlescripting or making a unique battle system?


2) And ( if 1) if not possible) do you have an other ideas how to handle this?
Like a work-around?

I thought about calling the formations throug a script and change the variable if you fight against that enemy that could use the attack, so it's depending on the enemy not on the attack itself. But that would not be exactly what I wanted. :-/

Maybe you have better ideas?
Metal King Slime
Send private message
 
 PostWed Mar 06, 2013 12:44 pm
Send private message Reply with quote
I'm fairly certain that it can't be done without scripting your own battle system. Then again, I've been wrong before, so don't take my word for it.
Being from the third world, I reserve the right to speak in the third person.

Using Editor version wip 20170527 gfx_sdl+fb music_sdl
Metal Slime
Send private message
 
 PostWed Mar 06, 2013 3:49 pm
Send private message Reply with quote
What exactly do you want to do with the global variable? One possible workaround for this is to have an attack that turns on a tag if it hits a hero. You can have an after battle script that checks the tag and adjusts the global variable accordingly.
Metal Slime
Send private message
 
 PostWed Mar 06, 2013 4:12 pm
Send private message Reply with quote
I wanted to check if one of the heros gets his by a certain attack and lower the variable by 1 each time he gets hit.
(I intend to use the variable for other things ingame as well, for example changing story elements depending on it or setting it +1 depending on answers give etc.)
I'm not sure, but the "set-tag-and-check-tag"-thing works for any hero not one specific hero, right?
Liquid Metal King Slime
Send private message
 
 PostWed Mar 06, 2013 4:19 pm
Send private message Reply with quote
Yes, support for battlescripting will happen someday, but i can't promise any timescale. There is still a lot of battle system cleanup that has to happen first.

Do you just want to detect if a particular hero has been hit by a particular attack? If so, you should be able to do it by setting a tag in the attack. Then you can check that tag i a script after the battle ends.
Metal Slime
Send private message
 
 PostWed Mar 06, 2013 4:27 pm
Send private message Reply with quote
Ah, yeah. The tag thing would also only work once per battle, so probably not a good idea in this case...

If the hero's not using MP, maaaybe you can also use that as a counter for how many time that hero's gotten hit by the attack? Like, start him off with 100 MP, and have the attack lower it by 1 every time he gets hit. And then at the end of the battle calculate how much MP he's lost and subtract that from the global variable?
Metal Slime
Send private message
 
 PostWed Mar 06, 2013 4:36 pm
Send private message Reply with quote
That's a good idea! Grin

But can I use this for diffent heros aswell?
I want to have each Hero's Global-Variable to sink then beeing hit by attaks but there attaks are diffrent from one hero to another. Maybe that's to complicated.
Maybe I can give each Hero a special typ and make them imune to attacks that should not affect their Mp... Confused
I'll play around with the attack bitsets to see how far I get. Smile
Liquid Metal Slime
Send private message
 
 PostWed Mar 06, 2013 5:53 pm
Send private message Reply with quote
This post is a good time to remind the developers about Bug 600 and how it would help your game (and mine) out a little more.

*I've been needing this for several years in order to complete my "Field Stats" feature in Powerstick Man XE.
Place Obligatory Signature Here
Blubber Bloat
Send private message
 
 PostWed Mar 06, 2013 5:58 pm
Send private message Reply with quote
marionline wrote:
Maybe I can give each Hero a special typ and make them immune to attacks that should not affect their Mp... Confused


Go into Edit General Game Data, go into battle system options, add more elements, then rename them to whatever you desire in the global text strings section. Make all heroes you don't want effected by the type of attack immune to it. Mission accomplished Kamina
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x V
Metal King Slime
Send private message
 
 PostThu Mar 07, 2013 1:28 am
Send private message Reply with quote
RMSephy wrote:
Ah, yeah. The tag thing would also only work once per battle, so probably not a good idea in this case...

If the hero's not using MP, maaaybe you can also use that as a counter for how many time that hero's gotten hit by the attack? Like, start him off with 100 MP, and have the attack lower it by 1 every time he gets hit. And then at the end of the battle calculate how much MP he's lost and subtract that from the global variable?



That is a good idea, and I'm guessing that it's a good workaround for what you're trying to do.



Meowskivich wrote:
marionline wrote:
Maybe I can give each Hero a special typ and make them immune to attacks that should not affect their Mp... Confused


Go into Edit General Game Data, go into battle system options, add more elements, then rename them to whatever you desire in the global text strings section. Make all heroes you don't want effected by the type of attack immune to it. Mission accomplished Kamina



Aye, that seems to be the way to do it. If you wind up having a lot of different types though, it can be a bit much to keep track of. On the other hand, I suppose not everyone is as disorganized as I am, hehe.
Being from the third world, I reserve the right to speak in the third person.

Using Editor version wip 20170527 gfx_sdl+fb music_sdl
Blubber Bloat
Send private message
 
 PostThu Mar 07, 2013 1:58 am
Send private message Reply with quote
AR-PUH-GUH! had 44 elements, if I remember right. however, they were used for various things, from basic elements (fire, water, wind, communicating with bats, etc) to summoning foes.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x V
Metal King Slime
Send private message
 
 PostThu Mar 07, 2013 2:00 am
Send private message Reply with quote
Meowskivich wrote:
AR-PUH-GUH! had 44 elements, if I remember right. however, they were used for various things, from basic elements (fire, water, wind, communicating with bats, etc) to summoning foes.



44?? Crikey, and I'm having trouble juggling things around with just 16 V
Being from the third world, I reserve the right to speak in the third person.

Using Editor version wip 20170527 gfx_sdl+fb music_sdl
Blubber Bloat
Send private message
 
 PostThu Mar 07, 2013 2:10 am
Send private message Reply with quote
Just checked. It was 45. I was so close on either end, my other guess was 46.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x V
Metal Slime
Send private message
 
 PostThu Mar 07, 2013 9:28 am
Send private message Reply with quote
Thanks a lot to Meowskivich for telling me how to do the elemental settings! Grin
That was very helpfull! You must know the engine well.

Talking about Elements I should thing of how many elements I want to use in game.
16 sounds like a lot to me and maybe a bit complicated to balance in the end, thoug I've never tried balancing before.
Blubber Bloat
Send private message
 
 PostThu Mar 07, 2013 4:12 pm
Send private message Reply with quote
You're welcome. Grin
I know how to use the basic engine well enough, it's the plotscripting that really gets me.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x V
Display posts from previous: