More success today

23 10 2008

We managed to get a huge chunk of code (only AS2) out of the way today, funny thing is all the concepts are coming back and this is getting so much easier to do! Anyways we’ve started changing Annie’s happiness levels now so dont annoy her.

Below is a look at the code we have used:

else if (happiness >= 1 and happiness <= 10){
speed = 2;
_root.cell._alpha=10;
myColor.setRGB(0×333333);
}

else if (happiness >= 11 and happiness <= 20){
speed = 4
_root.cell._alpha=20;
myColor.setRGB(0×000033);
}

else if (happiness >= 21 and happiness <= 30){
speed = 6
_root.cell._alpha=30;
myColor.setRGB(0×003366);
}

This part of code is just a small bit, there are obviously else of statements for the rest of the happiness (goes up to a maximum of 100).

Depending on the happiness level of Annie determines:

  • how fast it moves
  • how transparent it is
  • what colour it is

We have created happiness to be affected by pretty much everything the user does, so it is a very ‘sensitive’ organism. If you lie to Annie it will become unhappy…

Next we’re going to look at getting a getsystem time function.

Advertisement

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.