Community

AGI Programming => Mega Tokyo AGI Archive => Topic started by: CMK2901** on October 01, 2002, 05:12:26 PM

Title: Yet another problem!! (they just never stop...)
Post by: CMK2901** on October 01, 2002, 05:12:26 PM
I've just got so many problems this week, heh?  I was placing a view in a room and it compiles okay and everything, but when I load the game and get to the room, I have a duplicate view on the left side of the screen.  Walking through the "duplicate" causes it to dissapear.  I've had this problem before, but I have no idea how I fixed it.....
Title: Re:Yet another problem!! (they just never stop...)
Post by: Kon-Tiki on October 01, 2002, 05:15:14 PM
I think the view should be above the closing brackets of the header, but it would be easier to solve if we could see the code.
Btw: What game're you making?

-Kon-Tiki-
Title: Re:Yet another problem!! (they just never stop...)
Post by: Joey on October 01, 2002, 06:01:45 PM
post the code on the board so we can look at it. and like kon tiki said, what game are you making? or are you just learning and fooling around with a room? this is a great place for all your questions. everyone here is helpful and you'll find your answer in no time.
Title: Re:Yet another problem!! (they just never stop...)
Post by: CMK2901** on October 01, 2002, 06:38:23 PM
Well, I have:

    #include "defines.txt"


if (new_room) {
  load.pic(room_no);
  draw.pic(room_no);
  discard.pic(room_no);
  set.horizon(37);
  position(ego,23,78);
  status.line.on();
  accept.input();
  draw(ego);
  show.pic();
  load.view(005);
  set.view(o1,005);
  animate.obj(o1);
  set.cel(o1,0);
  stop.cycling(o1);
  position(o1,23,78);
  set.priority(o1,7);
  draw(o1);
}
return();

As for the game, I am making a Space Quest fan game.  I am in the very early stages, with only 3 rooms done.  I call it  "Space Quest: Unnumbered: Insert Subtitle Here"
or  SQUISH for short.
Title: Re:Yet another problem!! (they just never stop...)
Post by: Joey on October 01, 2002, 07:04:10 PM
everything is jumbled up. you probably have a memory issue. let me help here:

#include "defines.txt"


if (new_room) {
  load.pic(room_no);
  draw.pic(room_no);
  discard.pic(room_no);
  set.horizon(37);
  position(ego,23,78);
  status.line.on();
  accept.input();
{  
draw(ego);
  show.pic();
}  
load.view(005);
  set.view(o1,005);
  animate.obj(o1);
  set.cel(o1,0);
  stop.cycling(o1);
  position(o1,23,78);
  set.priority(o1,7);
  draw(o1);
}
return();

that might be it. if not try this:

#include "defines.txt"


if (new_room) {
  load.pic(room_no);
  draw.pic(room_no);
  discard.pic(room_no);
  set.horizon(37);
  position(ego,23,78);
{  
status.line.on();
  accept.input();
}
{  
draw(ego);
  show.pic();
}
 load.view(005);
  set.view(o1,005);
  animate.obj(o1);
  set.cel(o1,0);
  stop.cycling(o1);
  position(o1,23,78);
  set.priority(o1,7);
  draw(o1);
}
return();

if that doesnt work, let me know.
Title: Re:Yet another problem!! (they just never stop...)
Post by: Joel on October 01, 2002, 11:38:53 PM
You need to "animate.obj" o1 before you set its view.
Title: Re:Yet another problem!! (they just never stop...)
Post by: Chris Cromer on October 01, 2002, 11:46:14 PM
Joel is right... Joey that code is whack look at those brackets they are used in odd places. :-\

Use this:

Code: [Select]
#include "defines.txt"


if (new_room) {
  load.pic(room_no);
  draw.pic(room_no);
  discard.pic(room_no);
  set.horizon(37);
  position(ego,23,78);
  status.line.on();
  accept.input();
  draw(ego);
  show.pic();
  animate.obj(01);
  load.view(005);
  set.view(o1,005);
  set.cel(o1,0);
  stop.cycling(o1);
  position(o1,23,78);
  set.priority(o1,7);
  draw(o1);
}
return();
Title: Re:Yet another problem!! (they just never stop...)
Post by: CapTAmerik@ on October 02, 2002, 02:33:33 AM
I've bumped into this once or twice. The problem occured with me, when I had ego do different things upon entering the room, depending on which flags were set.

eg.
if ((previous_room_no == 1) && (f65)) would position ego somewhat differently than if ((previous_room_no == 1) && (!f65)).

I found that if you use "reposition" instead of "position", you will not get the duplicate.

My two cents,
CaptAmerik@
Title: Re:Yet another problem!! (they just never stop...)
Post by: Joel on October 02, 2002, 11:41:38 AM
Since this is all in the new_room section of the logic, you may also want to make show.pic() the last command that you execute.

I'd also recommend using the Base Logic Generator when you create a new room, and use the recommendations of its TODO comments to decide where to put your code.

http://weremoose.tripod.com/agi/agiUtilities.html
Title: Re:Yet another problem!! (they just never stop...)
Post by: Joey on October 02, 2002, 02:34:47 PM
shoot. i did make a boo boo. my bad. i didnt really read the code. my one chance to help someone about agi and i blew it.  ;)
Title: Re:Yet another problem!! (they just never stop...)
Post by: Patrick on October 02, 2002, 05:26:03 PM
Joey... you have shamed us all...


SMG240  ;)
jk
Title: Re:Yet another problem!! (they just never stop...)
Post by: Allen on October 04, 2002, 09:56:57 AM
Then read it next time, fool!
;D
I'm sorry are we still friends? ::)

-Allyb-