So I have a variable called coat, which stands for coat length. But when I test it, no matter the breed, it doesn’t change. The variable in the startup file says coat, at the breed choice it may say *set coat “Long” but when I check the stats screen is still says Unknown
could you copy the code (from startup and the bit in question? and the stats?) here
There’s other variables too, but they vary with each breed.
*create coat "Unknown" *choice #Breed 1 (text here) *set coat "Long" *finish
*set coat = “Long”
I believe *set coat “Long” is the proper way, no equals sign.
I think the finish might make it wonky
Hex, Could you post ALL of the relevant code?
If your concern is with the stats screen, we need to see the choicescript_stats file as well.
Here’s what the stats screen looks like.
[b]Breed Info[/b] *stat_chart text Breed text Size text Pelt text Eyes text coat text texture text tail text muzzle text Legs
The startup scene has:
*create coat "Unknown" *choice #breed 1 (text here) *set coat "Long" *goto_scene motherscene
There are numerous choices that look similar.
Here’s an actual snippit from my code, edited the text though
#Bloodhound (info text here) *set eyes "Brown" *set subbreed "Hound" *set size "Large" *set breed "Bloodhound" *set coat "Short" *set texture "Smooth" *set muzzle "Thick" *set legs "Long Thin" *set tail "Long Thin" *set str +1 *set smell +7 *set int +1 *set rescue +1 *set listen %+5 *set like %+5 *set moral %+25 *rand coatpat 1 3 *if (coatpat = "1") *set pelt "Liver & Tan" *goto_scene puremom *if (coatpat = "2") *set pelt "Tan" *goto_scene puremom *if (coatpat = "3") *set pelt "Black & Gold" *goto_scene puremom
I’m not entirely certain, but there might be several hiccups with the rand and… do the scenes continue via finish or return?
Minor point: You can just do *if coatpat = 1. You don’t need the quotation marks, because it’s not a string, it’s a numerical value. It’s good practice to not treat numbers as strings.
well the coatpat works. there’s nothing wrong with it at all, it’s only the coat that doesn’t work.
The scenes continue onto another scene entirely, which hasn’t been written.
What issues do you see with the rand?
mainly just what gower said.
and to code more efficiently you can just put the *rand coatpat on top of the file. Will work just as well.
As for the coat: The other bits work? can you screenshot the statsscreen?
Every other stat works fine, it’s literally just the coat that’s not working.
Here is the behavior stats screen.
[b]Behavioral Stats[/b] *stat_chart opposed_pair listen Listen Rebel opposed_pair rank Alpha Omega opposed_pair like Love Humans Hate Humans opposed_pair vocal Talkative Quiet opposed_pair moral Friendly Mean opposed_pair pack Pack Loner opposed_pair fear Brave Coward opposed_pair humview Tame Feral opposed_pair hon Honorable Dishonorable
okay. let’s try this:
- change all variable names to lower case (eyes instead of Eyes etc)
- change *create coat “unknown” to *create coat “”