- Joined
- Jan 13, 2020
- Messages
- 6
- Reaction score
- 3
- First Language
- russian
- Primarily Uses
- RMVX
I am trying to create a mechanic where enemy has to prepare itself in two steps before making powerful attack, while player being able to stop him by dealing damage during the preparation phase.
It works like that:
1. If enemy has no 'weapon prepared' and 'aiming' states enemy uses skill "prepare weapon", gaining state 'weapon prepared'.
2. if enemy has 'weapon prepared' state he then uses skill 'aim', gaining 'aiming' state.
3. if enemy has 'aiming' state he uses skill 'throw axe', losing both 'aiming' and 'weapon prepared' states.
Gaining states at first was a problem to make (inputing a.set_state(n) in formula didn't work for some reason), but Formula Effects script allowed me to do so, so that part seemingly working fine.
I made both 'weapon prepared' and 'aiming' states removable at receiving any type of damage (100%), and it seems to work - the message of falling out of state is displaying upon taking damage.
The problem is that enemy still proceeds with next step after falling out of state, required for the skill!
The steps here are:
1. Enemy uses skill 'prepare weapon', gaining state 'weapon prepared' at TURN ONE.
2. TURN ONE ends.
3. On start of the TURN TWO player character attacks enemy, who by receiving damage loses state 'weapon prepared', which is indicated by appeared message.
4. On the enemy action of TURN TWO enemy uses skill 'aim', despite having lost state 'weapon prepared', receiving 'aiming' state.
5. TURN TWO ends.
The same thing then happens with 'aiming' and then enemy successfully throws axe despite losing both intended states for skill's condition.
As i understand the enemy decides what action to take before the turn starts and then he commits the action despite if conditions are made unappliable during the same turn?
If so, and in any other case, i searched the web for similar issues but didn't find any and i'm having trouble with coming up with any type of workaround myself, so could anyone help me with the solution here?
Thank you in advance!
It works like that:
1. If enemy has no 'weapon prepared' and 'aiming' states enemy uses skill "prepare weapon", gaining state 'weapon prepared'.
2. if enemy has 'weapon prepared' state he then uses skill 'aim', gaining 'aiming' state.
3. if enemy has 'aiming' state he uses skill 'throw axe', losing both 'aiming' and 'weapon prepared' states.
Gaining states at first was a problem to make (inputing a.set_state(n) in formula didn't work for some reason), but Formula Effects script allowed me to do so, so that part seemingly working fine.
I made both 'weapon prepared' and 'aiming' states removable at receiving any type of damage (100%), and it seems to work - the message of falling out of state is displaying upon taking damage.
The problem is that enemy still proceeds with next step after falling out of state, required for the skill!
The steps here are:
1. Enemy uses skill 'prepare weapon', gaining state 'weapon prepared' at TURN ONE.
2. TURN ONE ends.
3. On start of the TURN TWO player character attacks enemy, who by receiving damage loses state 'weapon prepared', which is indicated by appeared message.
4. On the enemy action of TURN TWO enemy uses skill 'aim', despite having lost state 'weapon prepared', receiving 'aiming' state.
5. TURN TWO ends.
The same thing then happens with 'aiming' and then enemy successfully throws axe despite losing both intended states for skill's condition.
As i understand the enemy decides what action to take before the turn starts and then he commits the action despite if conditions are made unappliable during the same turn?
If so, and in any other case, i searched the web for similar issues but didn't find any and i'm having trouble with coming up with any type of workaround myself, so could anyone help me with the solution here?
Thank you in advance!
Last edited: