I'm more of a graphic design persone, not a programmer, but sometimes I can figure it out.
Is it possible to load an image into the character designer using javascript?
I have a series of "checkboxes" that need to cycle through 3 different images (blank,/,X).
I guess I could represent these three choices by creating a box that changes colors instead, (white/grey/black), but I would prefer the images idea.
Is this possible?
thanks in advance.
Comments
I have a button, called button1
I have a square that is filled with the color red, rgb(255,0,0).
Here's my simple little javascript, written in the script window.
// declare colors
var Blue = rgb(0,128,255)
var Grey = rgb(192,192,192)
var Black = rgb(0,0,0)
var White = rgb(255,255,255)
var Red = rgb(255,0,0)
function clickme {
box1.FillColor=Grey
}
In button1, the source is clickme, which should run the script above.
The script should take box1, and change it's color to rgb(255,255,0)
Is this correct? Or what am I doing wrong?
Any help would be great, thanks.
This works for me on a test sheet.
Also, makes sure your object is not set to clear.
I downloaded the latest version of Character Designer.
I started a new sheet with only one button and one red box.
I named the box Box1, and the button source says a
I copied your script into the script sheet.
Nothing, the box stays as a red box...
However if I put Box1.FillColor=(0,255,0) into the buttons source, it turns black, but I can't make it turn the color I want, green in this case...
Try the attached character sheet definition
I've attached a character sheet of what I'm looking for.
I need to create 3 different wound levels represented by colors. Blue/Grey/Black. Each starts out as Blue.
There will be 3 different catagories that the player needs to be able to change. Physical/Mental/Spiritual
Each Catagory has 3 "chances" (boxes) that can be changed... Is this complicated to do?
I don't suppose a colored box can be changed to a button? Or a button have different color backgrounds? Or maybe a Checkbox color that can change?
But each time the box is clicked, the current color changes to the next color...
Perhaps it's possible to get the 3 FillColor from Boxes hidden on another page, and write them to the Box.FillColor?
You have something like Which always results in 3. Use a switch statement, or if ... else should take care of the problem.
So now I need many of these button/square combinations.
Click button1 changes the fill in box1
Click button2 changes the fill in box2.. ect.
Is there a better way to do this than copying the same code for every button/square? There will be 100 squares on 1 character sheet.
I was thinking of an array, but I don't know how to use it yet. This will be my project for this week.
**I've been trying to figure this out, but still it's not working**
Even making copies of the button and changing the variable names doesn't want to work. I thought that would be the simple way of doing it...
Thank you ever so much Ed for your help. I will post my finished sheet when it's complete for anyone else that wants to take a look at it. For now, I'm posting my test sheet.
**update** Apparently it is.. Now if I can figure out how to use one function instead of many functions for the same thing, I'd be laughing!
**new character file attached if anyone can give me a hand up!
Sweet. Now I feel smart again... I'll try not letting this go to my head.
And yes, it's ok to laugh at me. To me, this is a big deal...
I hope to have a complete Character Sheet by the end of next week!
The new test is attached.
I got my sheet set up and it looks pretty good. A few tweaks here and there yet, but all-in-all it works..
However, I can't seem to get some information to save with the file, so if anyone knows the problem with this, please let me know.
I need each box that cycles through different colors to be saved, so the player doesn't have to re-set the boxes each time they open the file.
thanks
I know I said I would post my character sheet a long time ago, but life has been good.
So here it is, attached. It's still not complete because I haven't figured out the save feature yet.
The problem is that after using the sheet, setting the damages and modifiers, then after the session is done and I save the character, none of the damage boxes remain checked, but the attributes don't reset either. So the next time we open the character sheet, the stats are modified, but the damage boxes are not checked, resulting in further modified stats, instead of starting where we left off from a previous session.
I know that doesn't make a lot of sense, but try the sheet to get a feel for what I'm talking about.
Are you saying the check boxes arent saving between uses?
Any help with this is appreciated. Thanks
What would be the difference between your viewer and mine?
I'm using 1.01c
I thought my code was pretty straight forward, but obviously I don't understand programming. I'm starting to think it's evil! :twisted:
I'll upload my latest, but it's not like I changed anything cause I don't have a clue. This is getting beyond me.
I open the sheet in the designer.. I test the sheet in the viewer.. I add some damage to the figure, resulting in a change in his stats.. I save the sheet in the viewer.. I push the open button.. The sheet loads in the view.. The damaged stats are still there, but the boxes are reset to white again. The boxes need to retain their color so as to add/subtract the damage from the figure.
Why is this not working?
I downloaded the same char sheet designer thats online and installed it.
Opened the definition file with the designer.
Did 'test in viewer'.
Clicked one of the damage boxes until it changed to red (the boxes on the first tab over the image of a person)
Saved the file.
Quit the viewer.
Double clicked the .character I just made in Windows Explorer.
The sheet opened up, and the box was red as before
I repeated the process several times, changing other boxes, and it always works.