Thread

bot ideas (Sdk)

bot ideas // Sdk

1  |  

=?iso-8859-1?q?eep=b2?=

Jan 2, 1999, 8:30pm
Weather bots: moving clouds (maybe even a morphing algorythm or two to give the effect of actual clouds), storms (rain, snow, hail, cats and dogs, whatever), fog, etc. Woo! Sure would look more realistic than animated textures on polygons that go too fast or are too jerky if repeating frames...

byte me

Jan 2, 1999, 8:59pm
Well I'm thinknig of experimenting and doing something like that using aw_random to propb pick different locations and what kind of weather it will be...

[View Quote] > Weather bots: moving clouds (maybe even a morphing algorythm or two to give the effect of actual clouds), storms (rain, snow, hail, cats and dogs, whatever), fog, etc. Woo! Sure would look more realistic than animated textures on polygons that go too fast or are too jerky if repeating frames...

veleno

Jan 2, 1999, 11:55pm
--------------5D79F3DA3EC6F9E3874D5716
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

I've been wondering how to use the aw_random function in the sdk. I know it goes
if (aw_random () == 1000000)
puts ("You sure are lucky");
But how do you control the range that it returns? it says something about 6000 digits in the docs...

[View Quote] > Well I'm thinknig of experimenting and doing something like that using aw_random to propb pick different locations and what kind of weather it will be...
>
[View Quote] --------------5D79F3DA3EC6F9E3874D5716
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I've been wondering how to use the aw_random function in the sdk. I know
it goes
<br><i>if (aw_random () == 1000000)</i>
<br><i>&nbsp; puts ("You sure are lucky");</i>
<br>But how do you control the range that it returns? it says something
about 6000 digits in the docs...
[View Quote] --------------5D79F3DA3EC6F9E3874D5716--

walter knupe

Jan 3, 1999, 12:02am
This is a multi-part message in MIME format.

------=_NextPart_000_007C_01BE36C5.72DB8980
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

In plain c, use a modulo operation to control it...=20

say you want to have numbers between 1-10... you do a

int myrandom =3D abs ( aw_random() % 10) + 1; // %10 produces -9 to 9, =
to take absolute value and add 1

or for numbers between 15 to 30

int my2ndrandmo =3D abs (aw_random() % 16) + 15;

hope that helps,

Walter

Veleno schrieb in Nachricht <368ECE0D.F5673E54 at hiwaay.net>...
I've been wondering how to use the aw_random function in the sdk. I =
know it goes=20
if (aw_random () =3D=3D 1000000)=20
puts ("You sure are lucky");=20
But how do you control the range that it returns? it says something =
about 6000 digits in the docs...=20
[View Quote] Well I'm thinknig of experimenting and doing something like that =
using aw_random to propb pick different locations and what kind of =
weather it will be...=20
[View Quote] > Weather bots: moving clouds (maybe even a morphing algorythm =
or two to give the effect of actual clouds), storms (rain, snow, hail, =
cats and dogs, whatever), fog, etc. Woo! Sure would look more realistic =
than animated textures on polygons that go too fast or are too jerky if =
repeating frames...


------=_NextPart_000_007C_01BE36C5.72DB8980
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!doctype html public "-//w3c//dtd html 4.0 =
transitional//en">
<META content=3D'"MSHTML 4.72.3511.1300"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#b8b8b8>
<DIV><FONT face=3DArial size=3D2>In plain c, use a modulo operation to =
control it...=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>say you want to have numbers between =
1-10...&nbsp;=20
you do a</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>int myrandom =3D abs ( aw_random() % =
10) +=20
1;&nbsp;&nbsp; // %10 produces -9 to 9, to take absolute value and add=20
1</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>or for numbers between 15 to =
30</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>int my2ndrandmo =3D abs (aw_random() % =
16) +=20
15;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>hope that =
helps,</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Walter</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
<DIV>Veleno<ANNETTE at HIWAAY.NET> schrieb in Nachricht &lt;<A=20
=
href=3D"mailto:368ECE0D.F5673E54 at hiwaay.net">368ECE0D.F5673E54 at hiwaay.net=
</A>&gt;...</DIV>I've=20
been wondering how to use the aw_random function in the sdk. I know =
it goes=20
<BR><I>if (aw_random () =3D=3D 1000000)</I> <BR><I>&nbsp; puts =
(&quot;You sure=20
are lucky&quot;);</I> <BR>But how do you control the range that it =
returns?=20
it says something about 6000 digits in the docs...=20
[View Quote] ------=_NextPart_000_007C_01BE36C5.72DB8980--

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn