Yet another problem!! (they just never stop...)

CMK2901** 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.....
Kon-Tiki 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-
Joey 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.
CMK2901** 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.
Joey 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.
Joel You need to "animate.obj" o1 before you set its view.
AGI1122 Joel is right... Joey that code is whack look at those brackets they are used in odd places. :-\

Use 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();
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();
CapTAmerik@ 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@
Joel 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
Joey 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. ;)
smartguy240 Joey... you have shamed us all...


SMG240 ;)
jk
rwfromxenon Then read it next time, fool!
;D
I'm sorry are we still friends? ::)

-Allyb-