I've never heard of this before, but I'm definitely looking forward to it now.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: MrColossal on Wed 04/02/2004 23:22:03
my camp is the plan, upstate new york
Quotefunction xyzzy_walk_aimlessly(){
if (IsTimerExpired(2)){
if (character [XYZZY].walking == 0) { //thanks to a-v-o for this script
r_outer = r_inner;
while (r_outer == r_inner)
{
r_outer = MIN_DISTANCE + Random (MAX_DISTANCE - MIN_DISTANCE);
r_inner = MIN_DISTANCE + Random (r_outer - MIN_DISTANCE);
}
r_middle = (r_outer + r_inner) / 2;
direction = 0;
}
int pc = GetPlayerCharacter ();
int dx = character [XYZZY].x - character [pc].x;
int dy = character [XYZZY].y - character [pc].y;
int dist = (dx * dx) + (dy * dy);
if (direction == 0)
{
if (dist < (r_middle * r_middle))
{
direction = 1;
MoveCharacter (XYZZY, character [pc].x + Random (r_outer * 2) - r_outer, character [pc].y + Random (r_outer * 2) - r_outer);
}
else
{
direction = -1;
MoveCharacter (XYZZY, character [pc].x, character [pc].y);
}
}
else if (((direction > 0) && (dist >= (r_outer * r_outer))) || (((distance > dist) && (character [pc].walking == 0)) && (dist <= (r_inner * r_inner))))
{
StopMoving (XYZZY);
}
distance = dist;
}
else {
xyzzyrerandomize = 1;
}
}
function xyzzy_lie_down() //thanks again a-v-o
{
if (l_status == LS_START)
{
MoveCharacter(XYZZY, Random(1280), Random(960));
l_status = LS_WALKING;
}
else if (l_status == LS_WALKING)
{
if (character[XYZZY].walking == 0)
{
FaceLocation(XYZZY, character[XYZZY].x, 0);
SetCharacterView(XYZZY, 28); //lying down view
l_status = LS_DOWN;
SetTimer(1, 1200 + Random(3600));
}
}
else if (l_status == LS_DOWN)
{
if (IsTimerExpired(1))
{
l_status = LS_NORMAL;
xyzzyrerandomize = 1; //used by the function which will randomize Xyzzy's action, haven't coded yet
SetCharacterView(XYZZY, 22); //normal view
}
}
}
function xyzzy_randomize() {
if (xyzzyrerandomize == 1) {
xyzzyrerandomize = 0;
xyzaction = Random(1);
}
if (xyzaction == 0) {
xyzzy_lie_down();
}
if (xyzaction == 1) {
xyzzy_walk_aimlessly();
SetTimer(2, 360 + Random(200));
}
}
Quote from: Ben on Sun 01/02/2004 22:25:46
Even if it did work, you wouldn't be able to use it with sprites, since the artifacts from compression would make transparency impossible..
Quote from: a-v-o on Sun 01/02/2004 14:16:49Unchecked.
Look at the character page: checkbox "Can be walke through"
Quote from: AlecW on Sun 01/02/2004 02:47:47
Could you make me a character?
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.122 seconds with 14 queries.