your hair~nail growth stuff (aka 'growth' ) can be done a bunch of different ways....
1. current length integer * growth multiplier integer
hair length: 6 inches
growth multiplier integer: 2 (this is a bit too high~big for a multiplier ~ see below, lol. 1.0 to 1.5 would probably be better ~ or google what is the real growth multiplier~integer of actual~real hair growth, lol)
6 * 2 = 12 inches as new hair length (foot long hair now!)
12 * 2 = 24 inches as new hair length (2 foot long hair now!)
24 * 2 = 48 inches as new hair length (we're just about getting into repunsel ~ disney princess hair 'dragging on the floor' length, lol)
etc etc etc
2. current length integer + hair growth integer
hair length: 6 inches
hair growth: hair length + 2
6+2=8
8+2=10
10+2=12
etc etc etc
3. etc etc etc ways...
-------
as for the triggers... there's many ways as well...
the easiest being just directly using a Turnscript (or Timer), and~or using another Integer Attribute that is increasing (such as a 'day' Integer Attribute, which your 'growth' uses ~ is based off of), which has a trigger (such as, again, a Turnscript or a Timer).
neonayon wrote:I also figured a "Global TurnScript" would be the best way to go about it --- that way, if the player goes idle for something IRL, they don't come back with hair down to the floor, or ghastly 3 foot long nails or something lol. Leaving it a turn-script I think means every like...50 or 100 actions the player takes grows their hair and nails respectively.
So just to be clear doing it the global route...you....
Right Click the "game.object"
Add Turn-Script, select start when game begins
(then I don't know what to do from here)
or do you...
player.object
attributes (and since we already have "player.hairlength, player.nails" added in)
and add it here?
neonayon wrote:Right Click the "game.object"
<game name="xxx">
<attr name="turns" type="int">0</attr>
</game>
<turnscript name="global_turnscript">
hair_growth_function
game.turns = game.turns + 1
</turnscript>
<function name="hair_growth_function">
for (x, 0, 200, 50) {
if (game.turns = ToInt (x)) {
player.hair_length = player.hair_length + 2
msg ("Your hair grew anotehr 2 inches in length.")
}
}
</function>
game.day = 0 % 7 -> 0 / 7 -> Remainder 0 -> day 0
game.day = 1 % 7 -> 1 / 7 -> Remainder 1 -> day 1
game.day = 2 % 7 -> 2 / 7 -> Remainder 2 -> day 2
game.day = 3 % 7 -> 3 / 7 -> Remainder 3 -> day 3
game.day = 4 % 7 -> 4 / 7 -> Remainder 4 -> day 4
game.day = 5 % 7 -> 5 / 7 -> Remainder 5 -> day 5
game.day = 6 % 7 -> 6 / 7 -> Remainder 6 -> day 6
game.day = 7 % 7 -> 7 / 7 -> Remainder 0 -> day 0
game.day = 8 % 7 -> 8 / 7 -> Remainder 1 -> day 1
game.day = 9 % 7 -> 9 / 7 -> Remainder 2 -> day 2
game.day = 10 % 7 -> 10 / 7 -> Remainder 3 -> day 3
game.day = 11 % 7 -> 11 / 7 -> Remainder 4 -> day 4
game.day = 12 % 7 -> 12 / 7 -> Remainder 5 -> day 5
game.day = 13 % 7 -> 13 / 7 -> Remainder 6 -> day 6
game.day = 14 % 7 -> 14 / 7 -> Remainder 0 -> day 0
game.day = 15 % 7 -> 15 / 7 -> Remainder 1 -> day 1
game.day = 16 % 7 -> 16 / 7 -> Remainder 2 -> day 2
game.day = 17 % 7 -> 17 / 7 -> Remainder 3 -> day 3
game.day = 18 % 7 -> 18 / 7 -> Remainder 4 -> day 4
game.day = 19 % 7 -> 19 / 7 -> Remainder 5 -> day 5
game.day = 20 % 7 -> 20 / 7 -> Remainder 6 -> day 6
game.day = 21 % 7 -> 21 / 7 -> Remainder 0 -> day 0
game.day = 22 % 7 -> 22 / 7 -> Remainder 1 -> day 1
etc etc etc
day 0: sunday
day 1: monday
day 2: tuesday
day 3: wednesday
day 4: thursday
day 5: friday
day 6: saturday
day 0: sunday
day 1: monday
day 2: tuesday
day 3: wednesday
day 4: thursday
day 5: friday
day 6: saturday
day 0: sunday
day 1: monday
day 2: tuesday
day 3: wednesday
day 4: thursday
day 5: friday
day 6: saturday
day 0: sunday
day 1: monday
day 2: tuesday
day 3: wednesday
day 4: thursday
day 5: friday
day 6: saturday
etc etc etc
etc etc etc
<game name="xxx">
<attr name="day" type="int">0</attr>
</game>
<turnscript name="global_turnscript">
if (game.day = 3) {
// once a week (on wednesday), your hair grows another 2 inches
plauer.hair_length = player.hair_length +2
}
game.day = (game.day + 1) % 7
</turnscript>
player.nail_count = player.nail_count + 1
if (player.nail_count = 50 and player.nail_length < 20) {
player.nail_count = 0
player.nail_length = player.nail_length + 1
}
The Pixie wrote:Try something like this for the nail turn script:player.nail_count = player.nail_count + 1
if (player.nail_count = 50 and player.nail_length < 20) {
player.nail_count = 0
player.nail_length = player.nail_length + 1
}
You will need to create integer attributes on the player called nail_count and nail_length. This will fire every 50 turns, and the length is capped at 20.
{random:You are a:You look like a:You appear to be a} {player.appearance} {player.race}, with {player.skin} skin, and a {player.face} face. {random:You stand at:You are} {player.height} feet tall, and appear {player.weight} as well. You also have {player.hairlength} inches long {player.haircolor} hair, {player.eyecolor} eyes, {player.ears} ears and {player.lips} lips too. {random:As for the rest of your body, you have:Your body has:} {random:nice:succulent:cute:beautiful:sexy} {player.breastsize} breasts, {player.hips} hips, and {player.tailtype} above your {player.butt}. You have {player.hands} hands with {player.nails} inch long nails and {player.feet} feet as well, and are {player.pregnant}. You are a {player.virginity}, {player.orientation} and {player.corruption}.
ways of lowering-shortening~raising-lengthening your nails~hair length too.
off-topic:
oops, sorry, forgot to give the name of the neko anime laughs:
title (japanese): Asobi ni Iku yo!
alternative english title 1: Bombshells from the Sky
alternative english title 2: Cat Planet Cuties
it's only 12 episodes long, 1 season only
and I just love its 'lonely spaceman' song (japanese and english), though I am a nerd, laughs.
neonayon wrote:When someone can cut their own hair for example, the integers can go "negative" ...like -11 inches of hair. Is there a way to cap the min at 0?
if [expresssion] player.hair_length < 0
(use~add the 'set a variable or attribute' Script) ----> set variable player.hair_length = [expression] 0
--------
conceptually:
if hair length is less than 0 (negative), then hair length is set to being at 0.
if [expresssion] player.hair_length > player.maximum_hair_length
(use~add the 'set a variable or attribute' Script) ----> set variable player.hair_length = [expression] player.maxium_hair_length
--------
conceptually:
if hair length is greater than the maximum hair length, then hair length is set to being equal to the maximum hair length (in this example that would be: 100, as I set~added the max Attribute as: player.maximum_hair_length = 100).
neonayon wrote:And with that asked...is there a way to say that when someone has "0" inches of hair, to say "You have 0 inches of hair making you bald?"
actually, I think you've got this in your game code somewhere anyways, so you'll just need to adjust~change it, as seen below.
(your message is much longer than this, so this is just the part you want to change~adjust of your entire message block)
print [expression] "xxx. You have {player.hair_length} inch long {player.hair_color} hair {if player.hair_length=0: making you bald}. xxx."
----
output (if player.hair_length is not 0), example:
You have 50 inch long black hair.
output (if player.hair_length is 0), example:
You have 0 inch long black hair making you bald.