State Remove Condition Change with Level? [ACE]

Hello, I have a few states that are only removed by walking 'x' steps and I would like 'x' to increase by 'y' with each level. So basically the states will last longer/take more steps to remove with each level.
by level, do you mean level of the character or level of the state? 
Control Variables [0001: Steps Required] = level


Control Variables [0001: Steps Required] *= y


Control Variables [0001: Steps Required] += x


Control Variables [0001: Steps Required] += Steps


Then in your parallel process event compare the current number of steps (in another variable) with the Steps Required variable, and if the new variable is greater than or equal to, remove the state and turn off the switch controlling the parallel process event.


Since you have a few states, and the states may not all be inflicted at the same time, or have the same wear-off period, you'll need to use a separate variable for each state.
by level, do you mean level of the character or level of the state?
Oh sorry, I mean the charater level.

Control Variables [0001: Steps Required] = level

Control Variables [0001: Steps Required] *= y

Control Variables [0001: Steps Required] += x

Control Variables [0001: Steps Required] += Steps

Then in your parallel process event compare the current number of steps (in another variable) with the Steps Required variable, and if the new variable is greater than or equal to, remove the state and turn off the switch controlling the parallel process event.

Since you have a few states, and the states may not all be inflicted at the same time, or have the same wear-off period, you'll need to use a separate variable for each state.
Thanks Shaz.

Let me see if I fully understand this (sorry, I know this is a little obnoxious, I'm still super new to everything and it helps me to write it all out)...

Spoiler
# Make a common event with:

Control Variables [0001: Steps Required] = level

# level = my charater's level using Game Data

Control Variables [0001: Steps Required] *= y

# y = any number I want to multiply the charater's level variable by

Control Variables [0001: Steps Required] += x

# x = a base value for steps required to remove the state

Control Variables [0001: Steps Required] += Steps 

# Steps from Game Data

#Set the comment event to run as an effect of a skill or item.

# For example: If character level = 3; y = 25; x=25; Steps = 1000.

# Then Variable [0001: Steps Required] = 1100

# Next make another common event with:

Control Variables [0002: Current Steps] = Steps

# Steps from Game Data

# Then put a parallel process (on each map? any way around this?) with:

@>Conditional Branch: Variable [0002: Current Steps] >= Variable [0001: Steps Required]

     @> Change State: Entire Party, - [state]

: Else

     @>

: Branch End

#Using the example: if Variable [0002: Current Steps] >= 1100 then the state will end


Thanks for taking the time to help!
Very close. I probably should have provided more detail.

First common event - no trigger; linked to the item:

Spoiler
Code:
# calculate level * yControl Variables [0001: Steps Required] = actors levelControl Variables [0001: Steps Required] *= y# add the base number of stepsControl Variables [0001: Steps Required] += x# now add the current number of steps (from game data)Control Variables [0001: Steps Required] += Steps# The variable now tells us at how many steps the effect will wear off.# Turn on a switch to make the second common event track the number of stepsControl Switches [0001: State X Applied] = ON
Second common event - set to parallel process and use the same switch that the other event just turned on as the condition:
Spoiler
Code:
# get the current number of steps from Game DataControl Variables [0002: Current Steps] = Steps# If we've taken the appropriate number of steps, make the effect wear offConditional Branch: Variable [0002: Current Steps] >= Variable [0001: Steps Required]  Change State: Entire Party - [State]  # And stop checking  Control Switches [0001: State X Applied] = OFFBranch End# As long as we keep checking, come up for air so other events can get a look-in (reduce lag)Wait 5 Frames
Note - they are both COMMON EVENTS. Not events on a map. The first has 'none' for the trigger and the second one has 'parallel process'.

If you are already using switch 1 or variable 1 or 2 for something else, then just allocate a different switch or variable number, but make sure you use it throughout.
Ah, I see! I didn't realize you could do a parallel process for common event. Works great!

Thanks again for the help.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/state-remove-condition-change-with-level-ace.18712/