Non-threaded
Forums
»
Advanced Editor Forum
»
Read Thread
Get help from the experts on variables, scripts, items, and other scary things.
JJJ-thebanisher
Reply
[Tutorial] Script that ages User
15 years ago
IF %MONTHS > 11 THEN
BEGIN
%MONTHSHELP := %MONTHS / 12
%MONTHS := %MONTHS - (12 * %MONTHSHELP)
%AGE := %AGE + %MONTHSHELP
%MONTHSHELP := 0
END
It's for age. Essentially, MONTHSHELP is a hidden variable, MONTHS is the amount of months over the current age the character is, and age is the number of years old the character is.
Sooo with this script, let's say I add 14 months to a guy who'se 19 years and 1 month old.
The script will do this:
Months is greater than 12 (It's 15)
BEGIN
Monthshelp is 1 (15/12, 19/12, 23/12 will all equal 1)
Months = 3 (15-12)
Age = 20 (19 + 1 (1 is monthshelp))
Monthshelp is cleared to 0
End
Final Result:
Character is 20 years and 3 months old and it's capable of handling any number of months I throw at it in a single link from 1 to 500000000 lol!
JJJ-thebanisher
Reply
[Tutorial] Script that ages User
15 years ago
I wrote a separate one that makes it so that it only displays the age if it's different than it was on the page before.
Jenxas
Reply
[Tutorial] Script that ages User
15 years ago
That's pretty useful.
JJJ-thebanisher
Reply
[Tutorial] Script that ages User
15 years ago
It works without the IF %MONTHS > 11 too.
Home
Storygames
Random
Search
Newly Created
Top Rated
Fantasy
Grimdark Fantasy
Sci-Fi
Modern
Horror
Love & Dating
Mystery / Thriller
Family Friendly
Historical
Puzzles / Games
Edutainment
Fan Fiction
Forums
Newbie Central
The Lounge
News & Updates
The Parlor Room
Creative Corner
Writing Workshop
Reading Corner
Adv. Editor Forum
Wishing Well
Bugs and Problems
My Stuff
Storygames
Pictures
Messages
Notifications
Duels
Saves
Comments
Points
Commendations
Notepad
Profile
View Profile
Help & Info
CYOA History
About Us
Privacy Policy
Terms Of Service
Logon
version 23.22 | ChooseYourStory © 2001 - 2025, Halogen Studios Entertainment |
contact us