YesNoOk
avatar

Improve/Fix Full life code (Turns mode) (Read 30140 times)

Started by Charles_2011, September 21, 2023, 03:00:16 am
Share this topic:
Improve/Fix Full life code (Turns mode)
#1  September 21, 2023, 03:00:16 am
  • ****
    • Peru

  • Online
Hello.

Some months ago I received help to implement a code to have a Full life in every round on Turns mode and works fine, here:

https://streamable.com/9cknt7

But, there is an issue when there is an intro between characters, here:

https://streamable.com/mzsizo

Here you have the code that I pasted on the Statedef 5900:

;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, 2] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190

;====================================================;
;===========; FULL LIFE - TURN MODE - T2 ;===========;
;====================================================;


[State -2, Full Life]
type = lifeset
trigger1 = roundstate = 0
trigger1 = teammode = turns
value = lifemax


;====================================================;

Maybe a solution could be to erase the intros between characters only on Turns mode, another solution could be to improve the code. I´m already tried so many things and I didn´t make it. Could you help me with this, please?
Last Edit: September 24, 2023, 09:55:14 am by Charles_2011
Re: Improve/Fix Full life code (Turns mode)
#2  September 21, 2023, 03:13:24 am
  • ****
  • Formerly DeathScythe
    • Brazil
    • lyricasky.neocities.org
Put the lifeadd code before the intro code.
Re: Improve/Fix Full life code (Turns mode)
#3  September 21, 2023, 11:02:30 am
  • ****
    • Peru

  • Online
Hello DS.

First of all, thank you for the answer.

I tested your recommendation but it doesn´t work. I tried this too, just in case but it didn´t work either:

;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

;====================================================;
;===========; FULL LIFE - TURN MODE - T2 ;===========;
;====================================================;

;[State -2, Full Life]
[State 5900, 1]
type = lifeset
trigger1 = roundstate = 0
trigger1 = teammode = turns
value = lifemax

;====================================================;

[State 5900, 2] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190
Re: Improve/Fix Full life code (Turns mode)
#4  September 22, 2023, 01:06:29 am
  • **
  • Sr. Símio Enfermo
    • Brazil
    • mansonrees.neocities.org
Just use trigger1 = 1 in that Sctrl.
Every char gonna have full life at the round start in any gamemode, anyway.

Edit: Are you using this code in the data/common1.cns file or in all chars individually?
If you're using this in the data/common1.cns, some chars may be overriding this state in their own files.
Last Edit: September 22, 2023, 01:13:10 am by Manson Rees
Re: Improve/Fix Full life code (Turns mode)
#5  September 22, 2023, 01:25:27 pm
  • ****
    • Peru

  • Online
Hello Manson Rees.

Thank you for the answer. I tested your recommendation but it doesn´t fix the problem, works fine against a character without intro, like the example that I shared before, but when is an intro the problem is still there, I used these combinations:

First attempt:

[Statedef 5900]
type = S

;====================================================;
;===========; FULL LIFE - TURN MODE - T2 ;===========;
;====================================================;

[State -2, Full Life]
type = lifeset
trigger1 = 1
;trigger1 = roundstate = 0
;trigger1 = teammode = turns
value = lifemax

;====================================================;

[State 5900, 2] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190

;================================================;

Second attempt:

[Statedef 5900]
type = S

[State 5900, 2] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190

;====================================================;
;===========; FULL LIFE - TURN MODE - T2 ;===========;
;====================================================;

[State -2, Full Life]
type = lifeset
trigger1 = 1
;trigger1 = roundstate = 0
;trigger1 = teammode = turns
value = lifemax

;====================================================;

I use these codes in the common of every character.
Re: Improve/Fix Full life code (Turns mode)
#6  September 22, 2023, 02:04:38 pm
  • ******
  • 90's Kawaii
  • :thinking:
    • Guatemala
The first attempt has the correct syntaxis, the second would not work because anything set up after the changestate is ignored.

The problem here is that you should not put this in the characters' common files, as most characters override state 5900. What you should do is look where 5900 is among the state files and put the block there.
Re: Improve/Fix Full life code (Turns mode)
#7  September 22, 2023, 03:04:57 pm
  • ******
    • Portugal
    • network.mugenguild.com/pots/
You can also place it in a negative state, but the amount of work is about the same. State -1 in the command files would be the easiest to find.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.
Re: Improve/Fix Full life code (Turns mode)
#8  September 24, 2023, 09:55:03 am
  • ****
    • Peru

  • Online
Hello again.

First of all, thank you to all of you, thank you for share your knowledge. Finally is working properly. I added this code at the end of the CMD:

[State -1, Full Life]
type = lifeset
trigger1 = roundstate = 0
trigger1 = teammode = turns
value = lifemax

I tested with more characters that have intros between and worked fine.

Thank you again for your help colleagues.