Jump to content

David Bergström

Member
  • Content Count

    11
  • Joined

  • Last visited

About David Bergström

  • Rank
    Member
  1. David Bergström

    Event Wrapper - scripting your events

    Yeah to be honest, I'm not sure why it won't work and more (I've confused myself)! XD I made a simplified version of the even using the same logic with the event make, and it appears to work, I'm just stumped! Anyway, I'll have a fiddle around and see what I can do, I'll fix it eventually! Thank you SO much for your help Tsukihime, you've been wonderfully patient!
  2. David Bergström

    Event Wrapper - scripting your events

    Oh! I just solved my own problem! It was my mistake with some variables from the self data suite that was causing the confusion! It works better now! Now I just have one other problem though When I use this code below; # setup fourth page event.set_page(3) event.character_name = "Farm Crops 1" event.character_index = 0 event.direction = 2 event.pattern = 0 event.trigger = 0 event.direction_fix = true #setup conditions for the fourth page event.condition.self_switch = "B" # require self-switch A to be set event.build { show_text add_message("A crop is beginning to grow here.") 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("C", 0) } choice_branch(1) {} } # setup fifth page event.set_page(4) event.character_name = "Farm Crops 1" event.character_index = 0 event.direction = 4 event.pattern = 0 event.trigger = 0 event.direction_fix = true #setup conditions for the fifth page event.condition.self_switch = "C" # require self-switch A to be set event.build { add_comment("<parallel page: 6>") show_text add_message("You have already watered this crop.") } # setup sixth page event.set_page(5) event.character_name = "Farm Crops 1" event.character_index = 0 event.direction = 4 event.pattern = 0 event.trigger = 4 event.direction_fix = true #setup conditions for the sixth page event.condition.self_switch = "C" # 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')==3"){ call_script("self_variable('c_date', $game_variables[2])") call_script("self_switch('c_water',false)") control_self_switch("D",0) control_self_switch("C",1)} cond_else{ call_script("self_variable('c_date', $game_variables[2])") control_self_switch("B",0) control_self_switch("C",1) } } } and the even doesn't fulfill the conditions to turn self_switch 'D' on and advance a stage in the crop's growth, (around line 162-164) it just stays on the current event page, even though the code specifies that it should turn on self_switch 'B', turn off self_switch 'C', thus moving the crop back to its un-watered state. Do you have any idea what I'm doing wrong here? Also on a side note: So sorry to be such a pain with this, but you are so helpful and so nice about this! The script has solved so many problems with my game, but I'm only new to scripting and I'm still a noob. Thank you so much!
  3. David Bergström

    Event Wrapper - scripting your events

    Oh that would be fantastic! Thank you so much!
  4. David Bergström

    Event Wrapper - scripting your events

    It should, because I'd be able to use the 'random' tab under 'control variable'. I don't think it's a problem with your script at all, I'm just not sure what the script call is for random generation of values c_date is a self_variable that is set to hold the same value as the date within the game, so it test to see if the date has changed, and if so, (in theory) should create a random number which gives a chance of the event (a farm crop) 'growing' by advancing the event page. However the 'random' value doesn't seem to effect it, as it always advances no matter what...
  5. David Bergström

    Event Wrapper - scripting your events

    Again, sorry to be a pest, but is there a way to generate a random value for a variable via a script call with regards to this script? At the moment, I'm using this code; " event.build { add_comment("<parallel page>") cond_if("self_variable('c_date')!=$game_variables[2]") { call_script("self_variable('c_chance', Random.rand(10-1))") cond_if("self_variable('c_chance')==3"){ call_script("self_variable('c_date', $game_variables[2])") call_script("self_switch('c_water',false)") control_self_switch("F",0)} cond_else{ control_self_switch("D",1)} } " To try and make so that there's a chance that self switch 'D' is activated instead of 'F', but for some reason it always defaults to F? Thanks in advance for any help you can give!
  6. David Bergström

    Supply and Demand

    I'm looking for a similar thing, so hopefully this acts as a bump. A supply and demand system would be fantastic if someone could make it.
  7. David Bergström

    CSCA Light Effects

    Umm, I keep getting the error "Script 'Cache' Line 91: Type Error Occured Can't convert array into string" does anyone have an idea how to fix it?
  8. David Bergström

    Event Wrapper - scripting your events

    I'm sorry to be necromancing this thread, but I was wondering if there is a way, once you have specified which character index is used with 'event.character_index = 1', is there a way to specify which image within that set is shown? Say, I want to use index 1, but I want to use the fifth image in that set, is there a way it can be done without setting a move_route within the event's build? Thank you so much in advance! As a note, this script is fantastic, it has solved so many game breaking problems I have been having!
×
Top ArrowTop Arrow Highlighted