My dearest Forum.
Recently, I've been trying to create a battle system that essentially rolls a d20 for every action. I've gottenstuck on trying to make an items menu. The code I have now is as follows;
@> Control Variables: [0003:Enemy health] = 261
@> Control Variables: [0001😛layer Health] = [Zack]'s HP
@> Play SE: 'Combat1', 100, 100, 50
@> Wait: 0.2 seconds
@> Play BGM: 'Battle 1', 100, 100, 50
@> Set Move Route: Player, Turn Up
@> Wait: 0.4 seconds
@> Text: Skeleton appeared!
@> Label: 1
@> Conditional Branch: Variable [0003:Enemy health] <= 0
@> Play BGM: 'JEnd of Battle 1', 100, 100, 50
@> Text: The Skeleton is out of HP! \.\.
: :
: : YOU WIN!
@> Control Variables: [0003:Enemy health] = -255
@> Erase Event
@>
: Else
@> Conditional Branch: Variable [0001😛layer Health] <= 0
@> Text: \n[0] is out of HP! \.\.
: : The battle was lost...
@> Game Over
@>
: Branch End
@> Control Variables: [0004:RFD] = 0
@> Control Variables: [0001😛layer Health] = [Zack]'s HP
@> Text: \n[0]'s HP is \v[1].
@> Show Choices: Attack, Magic, No
: When [Attack]
@> Control Variables: [0002:Roll to hit?] = Random No. (1...20)
@> Conditional Branch: Variable [0002:Roll to hit?] >= 10
@> Play SE: 'Blow4', 100, 100, 50
@> Control Variables: [0004:RFD] = Random No. (30...60)
@> Control Variables: [0003:Enemy health] -= Variable [0004]
@> Text: The attack hits, dealing \v[4] damage.
@>
: Else
@> Play SE: 'Evade1', 100, 100, 50
@> Text: \n[0]'s attack misses.
@>
: Branch End
@>
: When [Magic]
@>
: When [No]
@>
: Branch End
@> Control Variables: [0002:Roll to hit?] = 0
@> Text: The enemy attacks!
@> Control Variables: [0002:Roll to hit?] = Random No. (1...20)
@> Conditional Branch: Variable [0002:Roll to hit?] >= 10
@> Play SE: 'Blow4', 100, 100, 50
@> Control Variables: [0004:RFD] = Random No. (30...60)
@> Change HP: [Zack], - Variable [0004]
@> Text: The attack hits, dealing \v[4] damage.
@>
: Else
@> Play SE: 'Evade1', 100, 100, 50
@> Text: The Skeleton's attack misses.
@>
: Branch End
@> Jump to Label: 1
@>
: Branch End
I want to make an items menu in a similar vain to this, but am not sure how to do it.
Any advice would be greatly appreciated!
Recently, I've been trying to create a battle system that essentially rolls a d20 for every action. I've gottenstuck on trying to make an items menu. The code I have now is as follows;
@> Control Variables: [0003:Enemy health] = 261
@> Control Variables: [0001😛layer Health] = [Zack]'s HP
@> Play SE: 'Combat1', 100, 100, 50
@> Wait: 0.2 seconds
@> Play BGM: 'Battle 1', 100, 100, 50
@> Set Move Route: Player, Turn Up
@> Wait: 0.4 seconds
@> Text: Skeleton appeared!
@> Label: 1
@> Conditional Branch: Variable [0003:Enemy health] <= 0
@> Play BGM: 'JEnd of Battle 1', 100, 100, 50
@> Text: The Skeleton is out of HP! \.\.
: :
: : YOU WIN!
@> Control Variables: [0003:Enemy health] = -255
@> Erase Event
@>
: Else
@> Conditional Branch: Variable [0001😛layer Health] <= 0
@> Text: \n[0] is out of HP! \.\.
: : The battle was lost...
@> Game Over
@>
: Branch End
@> Control Variables: [0004:RFD] = 0
@> Control Variables: [0001😛layer Health] = [Zack]'s HP
@> Text: \n[0]'s HP is \v[1].
@> Show Choices: Attack, Magic, No
: When [Attack]
@> Control Variables: [0002:Roll to hit?] = Random No. (1...20)
@> Conditional Branch: Variable [0002:Roll to hit?] >= 10
@> Play SE: 'Blow4', 100, 100, 50
@> Control Variables: [0004:RFD] = Random No. (30...60)
@> Control Variables: [0003:Enemy health] -= Variable [0004]
@> Text: The attack hits, dealing \v[4] damage.
@>
: Else
@> Play SE: 'Evade1', 100, 100, 50
@> Text: \n[0]'s attack misses.
@>
: Branch End
@>
: When [Magic]
@>
: When [No]
@>
: Branch End
@> Control Variables: [0002:Roll to hit?] = 0
@> Text: The enemy attacks!
@> Control Variables: [0002:Roll to hit?] = Random No. (1...20)
@> Conditional Branch: Variable [0002:Roll to hit?] >= 10
@> Play SE: 'Blow4', 100, 100, 50
@> Control Variables: [0004:RFD] = Random No. (30...60)
@> Change HP: [Zack], - Variable [0004]
@> Text: The attack hits, dealing \v[4] damage.
@>
: Else
@> Play SE: 'Evade1', 100, 100, 50
@> Text: The Skeleton's attack misses.
@>
: Branch End
@> Jump to Label: 1
@>
: Branch End
I want to make an items menu in a similar vain to this, but am not sure how to do it.
Any advice would be greatly appreciated!