News:

MFG's Character of the Month: September 2026 Voting

Main Menu

Yagami-AD

Started by vicneo, August 01, 2023, 09:04:09 AM

Previous topic - Next topic

vicneo

Is there a way to make him instantly go into stronger form when his health starts to lose like Xavier Kim and Orochi K Shura?

WastedCoder

Quote from: vicneo on August 01, 2023, 09:04:09 AM
Is there a way to make him instantly go into stronger form when his health starts to lose like Xavier Kim and Orochi K Shura?

You need it for AI or you want it to happen automatically no matter who's in control?

vicneo

Quote from: WastedCoder on August 01, 2023, 01:31:03 PM
Quote from: vicneo on August 01, 2023, 09:04:09 AM
Is there a way to make him instantly go into stronger form when his health starts to lose like Xavier Kim and Orochi K Shura?

You need it for AI or you want it to happen automatically no matter who's in control?

I want it to happen automatically

WastedCoder

#3
Quote from: vicneo on August 01, 2023, 02:38:14 PM
Quote from: WastedCoder on August 01, 2023, 01:31:03 PM
Quote from: vicneo on August 01, 2023, 09:04:09 AM
Is there a way to make him instantly go into stronger form when his health starts to lose like Xavier Kim and Orochi K Shura?

You need it for AI or you want it to happen automatically no matter who's in control?

I want it to happen automatically

So, you go to your Statedef -2
and write something like this

[State 0, SelfState]
type = SelfState
trigger1 = statetype != A && ctrl && life<lifemax/2 && var(x) != y
value = ;transformation state number
ctrl = 0

People usually use vars for transformations, so if after transformation he sets var(2) to 1, that's what X and Y should stand for. This is important, or he will spam the transformation endlessly. It's if I understand correctly how this character works, of course. If u do everything right, then, after his health is below 50% he will automatically transform, assuming, he is on the ground and in control, not in the middle of any move etc.

EDIT: if he has many transformations, then u add more Selfstates changing the conditions as you like, and don't forget to include the var part.
And you can choose any life value u see fit, like 'life<500' etc. that was just an example.


vicneo

Quote from: WastedCoder on August 01, 2023, 07:27:13 PM
Quote from: vicneo on August 01, 2023, 02:38:14 PM
Quote from: WastedCoder on August 01, 2023, 01:31:03 PM
Quote from: vicneo on August 01, 2023, 09:04:09 AM
Is there a way to make him instantly go into stronger form when his health starts to lose like Xavier Kim and Orochi K Shura?

You need it for AI or you want it to happen automatically no matter who's in control?

I want it to happen automatically

So, you go to your Statedef -2
and write something like this

[State 0, SelfState]
type = SelfState
trigger1 = statetype != A && ctrl && life<lifemax/2 && var(x) != y
value = ;transformation state number
ctrl = 0

People usually use vars for transformations, so if after transformation he sets var(2) to 1, that's what X and Y should stand for. This is important, or he will spam the transformation endlessly. It's if I understand correctly how this character works, of course. If u do everything right, then, after his health is below 50% he will automatically transform, assuming, he is on the ground and in control, not in the middle of any move etc.

EDIT: if he has many transformations, then u add more Selfstates changing the conditions as you like, and don't forget to include the var part.
And you can choose any life value u see fit, like 'life<500' etc. that was just an example.



but xavier automatically transforms even without losing health, and orochi k shura no matter how he edits cmd, he still transforms automatically when he only loses 1% of his health

Odb718

Quote from: vicneo on August 01, 2023, 08:27:18 PMbut xavier automatically transforms even without losing health, and orochi k shura no matter how he edits cmd, he still transforms automatically when he only loses 1% of his health

Quote from: vicneo on August 01, 2023, 09:04:09 AM
Is there a way to make him instantly go into stronger form when his health starts to lose like Xavier Kim and Orochi K Shura?
I've no clue which way you want this to work, but
trigger1 = statetype != A && ctrl && life<lifemax/2 && var(x) != y

Edit the Life< part to how much life left/reduced you want.

Are you trying to say you added this code in, and it happens BEFORE the code can take effect, and you want it to NOT happen that fast?
If so, you have to look around for a changestate or a varset/add that's going to activate it.
vVv Gouken718 vVv SabreTooth718 vVv


vicneo

Quote from: WastedCoder on August 01, 2023, 01:31:03 PM
Quote from: vicneo on August 01, 2023, 09:04:09 AM
Is there a way to make him instantly go into stronger form when his health starts to lose like Xavier Kim and Orochi K Shura?

You need it for AI or you want it to happen automatically no matter who's in control?

So what if it's for AI?

XGargoyle

You use the AILevel trigger


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!