View Single Post
Old 10-19-2003, 03:07 AM   #2
philip
Galvatron
 

Join Date: June 24, 2002
Location: aa
Posts: 2,101
Quote:
Originally posted by robertthebard:
I'm trying to figure out a way to generate random encounters, but while chars are at sea. I haven't seen this done, and want to add it to a world that i have recently been asked to dm in. How do you do random encounters, as i still am no good at scripting, great at ideas, and things i'd like to see, but...Any clues would be appreciated. Thanks.
What do you mean by 'at sea'?

For the encounter you could use a switch case, like this:

int nD6 = d6(1);

switch (nD6)
{
case 1: (create monster command(s) here); break;
case 2: ,, ,,
case 3: ,, ,,
case 4: ,, ,,
case 5: ,, ,,
case 6: ,, ,,
}

This makes you able to create 6 different encounters, you can have more than one monster per case.

It might be easier to have random encounter triggers instead of doin it by scripting but it depends on the situation. If the encounter has to be at the same place everytime it's better to use the trigger, if you want to check with e.g. variables the scripting is easier.
philip is offline   Reply With Quote