Author Topic: Random treasure chest event. [RESOLVED]  (Read 1663 times)

Offline Rymdpotatis

  • Awakened Visionist
  • **
  • Posts: 94
  • LV: 1
    • View Profile
Random treasure chest event. [RESOLVED]
« on: August 30, 2008, 02:58:44 PM »
I'm having trouble with my random treasure chest event. I want it to be a random event that determines if the chest will appear or not, and a random event to determine what is in the chest.

This is my Chest event:
Page 1:
@>Control variables:[001:Chest Appear] = Random NO. (0...1)
@>
Page 2:
Variable>0001:Chest Appear is 1 or above
@>Conditional Branch: Variable:[001:Chest Appear] ==0
@>Erase Event
@>
Branch End
@>Conditional Branch:Variable [0001: Chest Appear ==1
@>Control Variables: [0002: Chest Loot] = Random No. (0...3)
@>Conditional Branch:Variable [0002: Chest Loot ==0
@>Change Items: [Red Potion], +1
@>Erase Event
@>
Branch End
@>Conditional Branch: Variable:[001:Chest Appear] ==0
@>Erase Event
@>
Branch End
@>Conditional Branch:Variable [0001: Chest Appear ==1
@>Control Variables: [0002: Chest Loot] = Random No. (0...3)
@>Conditional Branch:Variable [0002: Chest Loot ==1
@>Change Items: [Sword], +1
@>Erase Event
@>
Branch End

(Repeat 2 with changed item name and Chest Loot number.)

What happens is that it's always visible and it deals out items depending on where I stand relative to the chest. If I stand to the right I get the Sword, if I stand to the left I get the potion. And so on and so on. Any tip on what I've done wrong?
« Last Edit: August 30, 2008, 08:18:08 PM by Rymdpotatis »

Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: Random treasure chest event.
« Reply #1 on: August 30, 2008, 05:16:00 PM »
Woah... what's with this eventing o.o
It's so repetitive that's it's bad...

Page 1:
Control Variables:[0001: Chest Appear] = Random No. (0...1)
Control Self Switch: A = ON

Page 2:
Have conditions of variable 0001 Chest Appear is 1 or above
and Self Switch A is on.
Control Variables: [0002: Chest Loot] = Random No. (0....3)
  Conditional Branch:Variable [0002: Chest Loot == 0]
  Change Items: [Red Potion], +1
Else
  Conditional Branch:Variable [0002: Chest Loot == 1]
    Change Items: [Sword], +1
  Else
(repeat with changed condition and loot)
  Branch End
Branch End
Erase Event

Offline Rymdpotatis

  • Awakened Visionist
  • **
  • Posts: 94
  • LV: 1
    • View Profile
Re: Random treasure chest event.
« Reply #2 on: August 30, 2008, 07:53:00 PM »
Haha, yeah I know it's not very pretty nor effective. I'm still learning.

And thanks for the better event! =D
« Last Edit: August 30, 2008, 07:56:31 PM by Rymdpotatis »