![]() |
Random Scripts
So, since I have to do this offline, its in gs1. I need to figure out how to put a random script, instead of numbers, into names. heres what I have so far:
NPC Code: If that's wrong, sorry, I'm trying to remember what I have, and GraalEditor isnt working at the moment, but yeah, i have a working random number script tiggered by the player saying :choose.. But how do I assign numbers to NAMES, do I use flags, or what... :] thanks |
PHP Code:
|
You should not overload your event-statements
PHP Code:
|
You say it with such enthusiasm as though he's going to break something. It's preference really, and as they're highly related, I don't see the problem.
|
|
Funny you should post that:
"Similarly to rule three, do not combine unrelated conditional statements. Instead of writing shambling messes like this:" |
What does the 0,Tokenscount
do? I dont know what they stand for.. Everything else I get. |
That would be the random statement, getting a random chunk of text. 0 would be the minimum, and tokenscount would be the max(tokenscount is the number of tokens when using tokenize).
|
Quote:
Heres a tip, you must ALWAYS pay attention to comma's (unless they are wrapped in quotes) |
Aren't you supposed to do tokenscount + 1? ( random shouldn't pick the highest number)
Or does tokenscount not start with 0? |
Oh, I get it.
Couldn't you use tokenscount,tokenscount though? |
tokenscount doesn't start with 0, because it's giving you the actual number of tokens, so if you have four words, it will return 4.
And tokenscount,tokenscount wouldn't work because it'd always pick the last option for text. You used the same method in your script as well. I want to pick between the first text, and the last, randomly. 0-tokenscount means it will randomly pick between the first token and the last. |
Quote:
As stated, the 0 is the minimum meaning it is the lowest possible number to be rolled. tokenscount is the maximum meaning it is the highest number (actually, random never "reaches" the highest number, it just comes close). |
Quote:
|
Quote:
|
All times are GMT +2. The time now is 05:30 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.