RPG Maker Forums

Hey everyone,
I'm using Tsukihime's 'Event Wrapper' script at the moment, and I'v encountered a slight problem that no matter how many times I try to fix it, I can't seem to shake. Basically, I'm trying to script an 'crop' event that when the date ($game_variables[2]) changes, the even spits out a random number (which works) and then, due to this random number, either advances a stage in its growth, or reverts back to it's previous, un-watered state.
 

# setup first page event.character_name = "$Farm Soil" event.character_index = 0 event.priority_type = 1 event.trigger = 0 event.direction_fix = true event.build { call_script("self_variable('c_date', $game_variables[2])") show_text add_message("Would you like to water crop?") show_choices(["Yes","No"],0) choice_branch(0) { call_script("self_switch('c_water',true)") show_text add_message("You watered the crop.") control_self_switch("A", 0)} #turn on self-switch A when done } choice_branch(1) {} } # setup second page event.set_page(1) event.character_name = "$Farm Soil" event.character_index = 0 event.direction = 4 event.pattern = 0 event.trigger = 0 event.direction_fix = true #setup conditions for the second page event.condition.self_switch = "A" # require self-switch A to be set event.build { add_comment("<parallel page: 3>") show_text add_message("You have already watered this crop.") } # setup third page event.set_page(2) event.character_name = "$Farm Soil" event.character_index = 0 event.direction = 4 event.pattern = 0 event.trigger = 4 event.direction_fix = true #setup conditions for the third page event.condition.self_switch = "A" # require self-switch A to be set event.build { add_comment("<parallel page>") cond_if("self_variable('c_date')!=$game_variables[2]") { call_script("self_variable('c_chance',rand(60))") cond_if("self_variable('c_chance')>=30"){ call_script("self_variable('c_date', $game_variables[2])") call_script("self_switch('c_water',false)") control_self_switch("B",0) control_self_switch("A",1)} cond_else{ call_script("self_variable('c_date', $game_variables[2])") call_script("self_switch('c_water',false)") control_self_switch("A",1) } cond_else {} } #control_self_switch("A",1) } By my logic, given that the vast majority of the condition check works, the problem would have to be around lines 83-87 of the code, but for the life of me, I can't work out where I am going wrong!

Any help with this would be greatly appreciated!

Thanks in advance guys! :D

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,447
Members
137,820
Latest member
georg09byron
Top