States That Have a Chance of Automatically Using Skills

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
Ran a battle test with neither of the actors having the state to check what would happen. Once the first turn actually started (i.e. following command input):

I then tried it with only one of them having it, and even with both of them having it, and it gave me the same error.
It turns out the script calls are too long to fix into the script box.

Try this instead:

state = $data_states[state_id]$game_party.alive_members.each { |m| next unless m.states.include?(state) m.exec_state_triggers(state_id, :turn_start)}I've tested and it works in my case :)
 

Rigor Mortex

Mankind's Mirror
Veteran
Joined
Mar 14, 2012
Messages
65
Reaction score
4
First Language
English
Primarily Uses
Yeah, it's working now. There's an odd quirk where it will never activate on the first round, but I can live with that. Thank you so much!

EDIT: What would the script call be for enemies?
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
Yeah, it's working now. There's an odd quirk where it will never activate on the first round, but I can live with that. Thank you so much!

EDIT: What would the script call be for enemies?
In my case(using your demo), it activates on the 1st round as well :)

For enemies, try this:

Code:
state = $data_states[state_id]$game_troop.alive_members.each { |m|  next unless m.states.include?(state)  m.exec_state_triggers(state_id, :turn_start)}
 

Rigor Mortex

Mankind's Mirror
Veteran
Joined
Mar 14, 2012
Messages
65
Reaction score
4
First Language
English
Primarily Uses
Tried it, that script call works. Strangely, for enemies it DOES activate on the first turn, while for actors it doesn't. It's gotta be something on my end, but I haven't changed anything.
 
Last edited by a moderator:

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
@DoubleX

Are you still planning to update your state trigger script to support both starting turn and end of turn?
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
@DoubleX

Are you still planning to update your state trigger script to support both starting turn and end of turn?
I think it's already supported. For the timing as the turn start, you can try what I've said in this post; for the timing as the turn end, try using :turn :)
 

Murd

Apprentice
Member
Joined
Jan 28, 2015
Messages
112
Reaction score
7
First Language
Thai
Primarily Uses
I think it's already supported. For the timing as the turn start, you can try what I've said in this post; for the timing as the turn end, try using :turn :)
OK I'll give it a try. Great script anyway!
 

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

Latest Threads

Latest Profile Posts

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'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top