when i start my game the character that is ment to be in another room (room15) is in the starting room and i dont know why i set him to be in room 15.
the script
function game_start() {
Ã, Ã, ccDebug(1);
Ã, Ã, ccSetBlankView(5);
Ã, Ã, character[MAN].room = character[GetPlayerCharacter()].room;
Ã, Ã, character[MANB].room = character[GetPlayerCharacter()].room;
ccCreateCommand(1, "MOVE: 250, 120; MOVE: 305, 113; ROOM: 4,13,100; MOVE: 155,112; MOVE: 155,182; MOVE: 10,184; ROOM: 3,300,183; MOVE: 100, 110; GOTO:1;");
ccExecuteCommand(EAT, 1);
ccCreateCommand(2, "MOVE: 220, 145; MOVE: 90, 145; GOTO:2;");
ccExecuteCommand(RIVERGARD, 2);
}
does it have something to do with the character
[MANB].room = character[GetPlayerCharacter()].room;
command?
Yeah, comment out these two lines
character[MAN].room = character[GetPlayerCharacter()].room;
character[MANB].room = character[GetPlayerCharacter()].room;
comment?
Or in other words remove ;)
i did
it seems to work.
i also had another problem
MANB keeps stalling and the commands in the debug view start to flicker very fast and he dosent move.
QuoteMANB keeps stalling and the commands in the debug view start to flicker very fast and he dosent move.
What command line did you order him to execute? And where did you place the appropriate ccExecuteCommand(MANB, ? ? ?) function?
ccCreateCommand(2, "MOVE: 220, 145; MOVE: 90, 145; GOTO:2;");
ccExecuteCommand(RIVERGARD, 2);
(MANB is RIVERGARD)
On a sidenote, mport2004, to "comment out" a line means to add // to the beginning of the lines. It is called a comment in scripting jargon and will make AGS ignore those lines. It's preferable to deleting them, because you might need them again later, or it's useful as a way of narrowing down the problems.
ccCreateCommand(2, "MOVE: 220, 145; MOVE: 90, 145; GOTO:2;");
^--- goes here ---|
You probably want him to go to the first command in that chain, so do GOTO:
1;
You can also comment out whole blocks of text like this:
/*
This whole
section
will be
commented out.
*/