You are browsing as a guest. Sign up (or log in) to start making projects!

2h 30m 51s logged

Now, I’ve been working on the logic for having buttons to press for setting data. These are the two primary ways of storing info on Blades in the Dark (BitD as I’ll call it from now on) player sheets. I decided on logic where clicking button X sets the relevant data value to that, except for the first button when the value is already at 1. Then, it sets it to 0. The general logic is as follows:

First, I create a button array with the HTML objects to modify. Then, if the first button is clicked (array is 1-indexed for readability) and the stored value is alread 1, it sets it to 0. Finally, I update the buttons with a for loop, iterating over the array until I’ve colored the right number of buttons. The rest are colored with a darker shade. Now, I’m working on expanding this to the many different types of info in BitD, such as stress.

0
6

Comments 0

No comments yet. Be the first!