Possible to apply state to character randomly each turn?

Nanaki_Fan

Veteran
Veteran
Joined
Jul 15, 2014
Messages
501
Reaction score
159
First Language
English
Primarily Uses
Hello,

I am wondering if it is possible to apply a state to a character each turn in battle.

What I am aiming to do is have a character turn into a wolf which increases that characters skills but I want the draw back to be that each turn that passes with the "wolf state active" there is a chance that the character will fall into "confusion" state meaning he will attack allies.

Is this possible?
 

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
439
First Language
English
Primarily Uses
RMMV
You can set a troop event to run every turn that'll check whether or not the state should be applied. Just set a variable to a random value (this'll act as your probability), then check the variable's value and whether or not the actor has the werewolf state. So, something like this:


This setup says that for as long as Eric is a werewolf, there's a 50/50 chance each turn that he'll become confused.
 

Nanaki_Fan

Veteran
Veteran
Joined
Jul 15, 2014
Messages
501
Reaction score
159
First Language
English
Primarily Uses
You can set a troop event to run every turn that'll check whether or not the state should be applied. Just set a variable to a random value (this'll act as your probability), then check the variable's value and whether or not the actor has the werewolf state. So, something like this:



This setup says that for as long as Eric is a werewolf, there's a 50/50 chance each turn that he'll become confused.
Actually I don't want to edit all the troops but you did give me a good idea for a common event call! Randomized variables should do the trick.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
There are scripts that use the first troop as a template for troop events, resulting that the first troop's events will be executed for every troop without need to copy them into other troops.
 

Lowell

The Walking Atelier
Veteran
Joined
Apr 21, 2012
Messages
292
Reaction score
69
First Language
English
Primarily Uses
Pretty sure DoubleX Just got through updating his State Turn script to handle something like this.
 

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
There are scripts that use the first troop as a template for troop events, resulting that the first troop's events will be executed for every troop without need to copy them into other troops.
After spending minutes searching, I can't find such script you mentioned. Could you name the script? I think isuch script would be very handy for my project too.Thanks
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top