Quote from: Pablo on Mon 26/02/2007 07:55:38
If I'm wrong you can slap me back.
Slap, Slap, Slap!
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: Pablo on Mon 26/02/2007 07:55:38
If I'm wrong you can slap me back.
if (cMer1.Room != player.Room) {
return;
}
int ran2 = Random(9);
else {
if (cMer1.Moving == false) {
cMer1.WalkStraight(Random(320), Random(200), eNoBlock);
}
if (cMer1.Room == 1) {
if (ran2 == 0) {
cMer1.Walk(0, cMer1.y, eNoBlock);
}
else if (ran2 == 1) {
cMer1.Walk(230, 130, eNoBlock);
}
function game_start {
SetTimer(1, 80);
}
--------------------------
function repeatedly_execute {
int ran3 = Random(24);
if (IsTimerExpired(1)) {
if (ran3 == 0) {
cMer1.SayBackground("Blah Blah Blah");
}
if (ran3 == 1) {
cMer1.SayBackgorund("Yadda Yadda Yadda");
}
SetTimer(1, 80); //So it resets the timer to make him say it again, otherwise he'll never speak
}
Quote
1. The room borders don't work on a non-player characters. Might have to do some coding to get him to change rooms.
2. AGS has a fit when the other character is in a different room. I'm guessing this is because the walkable areas are no longer loaded so WalkStraight can't function. Might be best to not walk around if not in the same room, but randomly decide whether to appear in the player's room.
3. You might want to force the other character (at random times) to walk right up to the screen edge so that he does change rooms (once #1 is working). At the moment he wombles randomly around but seldom reaches the screen edges.
if (cMer1.x < 2) {
cMer1.ChangeRoom(int Room, int x, int y);
}
if ((cMer1.x == 230) && (cMer1.y == 130) {
cMer1.ChangeRoom(int Room, int x, int y);
}
SetTimer(int Number, int Loops);
if (cMer1.Room == player.Room) {
cMer1.Walk(Random(320), Random(200), eNoBlock, eWalkableAreas);
}
if (cMer1.Room == player.Room) {
cMer1.Walk(Random(1), Random(1), eNoBlock, eWalkableAreas);
}
if (cWelder.Room==cEgo.Room)
{
cWelder.Walk(cEgo.x, c.Ego.y, eBlock, eWalkableAreas);
}
Quote
function repeatedly_execute
{
if (cWelder.Room==cEgo.Room)
{
cWelder.Walk(cEgo.x, c.Ego.y, eBlock, eWalkableAreas);
}
if (cWelder.Room!=cEgo.Room)
{
cWelder.FollowCharacter(cEgo, int distancefromcharacter, int eagerness);
}
if (cWelder.IsCollidingWithChar(cEgo)==1)
{
// kill the player off functions
}
}
Quote from: Ishmael on Wed 29/11/2006 13:04:07
Made sure you haven't disabled the midi device in the game setup?
Quote from: PIT on Mon 27/11/2006 22:54:58
Sometimes they won't play.
Quote from: monkey_05_06 on Wed 01/11/2006 15:16:46
There's no need to use two labels. Just use one label and set it's text like I said before.
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.083 seconds with 13 queries.