Adventure Game Studio

Community => General Discussion => Topic started by: Kinoko on Wed 13/07/2005 13:57:29

Title: Script your daily event!
Post by: Kinoko on Wed 13/07/2005 13:57:29
I find myself doing this all the time lately, so I imagine I'm not the only one. Basically, write a script that describes a thought process or an action you perform in your daily life.

Here's mine:

function Ignore() {
  cEgo.Animate(currentactivity, vigor);
}

function Go() {
  int rand = Random(10);
  if (toiletcloseby==1) cEgo.Walk (toiletx, toilety, eBlock, eAnywhere);
  else if (toiletcloseby==0) cEgo.Walk (rand, rand, eBlock, eAnywhere);
}

[on key press]
if (urge==1) {
  if (urine<bladder) Ignore();
  if (urine>=bladder) Go();
}

Call me nuts, but I find it fun ^_^
Title: Re: Script your daily event!
Post by: Helm on Wed 13/07/2005 14:34:26
Wait(24000);
Title: Re: Script your daily event!
Post by: Phemar on Wed 13/07/2005 14:45:37

(erm, sorry, could you just ignore this post ... my cat ran over my keyboard and I pressed 'post' by accident. Sorry.)
Title: Re: Script your daily event!
Post by: auhsor on Wed 13/07/2005 16:36:03
Reminds me of a bad lecture in Uni last year when we spent about 2 hours writing an algorithm on how we would dress ET with him having no knowledge of clothes etc. I don't know how that is a daily event though for me, but lets just say it is.
Title: Re: Script your daily event!
Post by: monkey0506 on Wed 13/07/2005 16:56:35
void ReadPosts(int post_number) {
  player.Animate(LOOP_READ, 5);
  }

void Reply(int post_number, string reply) {
  player.Animate(LOOP_REPLY, 5);
  }

void ReadPostsAndReply(int post_number, string reply) {
  ReadPosts(post_number);
  Reply(post_number, reply);
  }

int FindNewPosts() {
  forum.Next();
  player.Animate(LOOP_FORUMFIND, 45);
  int tries = 0;
  while ((!forum.newposts) && (tries < 8)) {
    FindNewPosts();
    tries++;
    }
  if (!forum.newposts) {
    player.Animate(LOOP_SLEEP, 72000);
    Wait(1440000);
    FindNewPosts();
    }
  return forum.number;
  }

/* rep_ex */
if (FindNewPosts()) ReadPostsAndReply(forum.post_number, "hahaha.  I iz so r0xx0rz!!!11");
Title: Re: Script your daily event!
Post by: Gregjazz on Wed 13/07/2005 17:35:25
Quote from: Kinoko on Wed 13/07/2005 13:57:29
I find myself doing this all the time lately, so I imagine I'm not the only one. Basically, write a script that describes a thought process or an action you perform in your daily life.

Here's mine:

function Ignore() {
  cEgo.Animate(currentactivity, vigor);
}

function Go() {
  int rand = Random(10);
  if (toiletcloseby==1) cEgo.Walk (toiletx, toilety, eBlock, eAnywhere);
  else if (toiletcloseby==0) cEgo.Walk (rand, rand, eBlock, eAnywhere);
}

[on key press]
if (urge==1) {
  if (urine<bladder) Ignore();
  if (urine>=bladder) Go();
}

Call me nuts, but I find it fun ^_^

I love the use of eAnywhere. :)
Title: Re: Script your daily event!
Post by: rika on Thu 14/07/2005 16:57:47
 // go to bed
int my_bed

funtion (hotspot ibed)
if (my_bed == 5) {
Display ("Time to go to bed");

}}
Title: Re: Script your daily event!
Post by: DoorKnobHandle on Thu 14/07/2005 17:10:33
I have a slight variation of Helm's idea here...



int i = 0;

while ( i != -1 )
{
   Wait ( 1 );
   i++;
}



You are right, this stuff is kinda fun actually. I might come back later and post something else when I find an idea...
Title: Re: Script your daily event!
Post by: Helm on Thu 14/07/2005 17:16:33
I like how you neatified my joke code. But checking every machine cycle for an indefinite ( or close to indefinite ) amount of time isn't exactly productive. The only benefit of your code over mine is that it waits for conditions ment to stop waiting, and that defeats the purpose! Anyway, something special happens after exactly 24000 cycles, let me tell you.
Title: Re: Script your daily event!
Post by: monkey0506 on Thu 14/07/2005 17:35:12
Yeah...Guybrush drowns. ;D

40 game loops = 1 second
24000 / 40  = 600 seconds
60 seconds = 1 minute
600 / 60 = 10 minutes

Guybrush can only hold his breath 10 minutes. ;D
Title: Re: Script your daily event!
Post by: SSH on Fri 15/07/2005 09:54:55
if (cBoss.Room=player.Room) {
  player.Animate(PRETEND_TO_WORK);
} else {
  player.Animate(#ags);
}