Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: frenchy_117 on Wed 21/05/2003 20:25:13

Title: How change view back?
Post by: frenchy_117 on Wed 21/05/2003 20:25:13
I have a problem. I have  it set up where the character changes view but i need to chan ge it back to the ORIGANAL view and not just back to view 1 or 2. ???
Title: Re:How change view back?
Post by: Jimi on Wed 21/05/2003 20:27:18
well, just use the same command for changing it, but to the original view.
Title: Re:How change view back?
Post by: scotch on Wed 21/05/2003 21:18:22
If you changed it to do an animation then waht it to change back to the original view you should use
ReleaseCharacterView (CHARID) I think
Title: Re:How change view back?
Post by: frenchy_117 on Thu 22/05/2003 00:13:52
you guys know what game i am making so here it is. I have it set upi so that you can pick a character on the game. i want it to go ack to the origanal or else the girl in the car, when she ggets out then she would become a guy so i want it to origanl!!! not just a veiw i want the ORIGANEL!!!
Title: Re:How change view back?
Post by: Timosity on Thu 22/05/2003 06:27:34
I'm not sure exactly what you mean but to change characters you can do this

SetPlayerCharacter(char2);
character[char1].room = 0;// this is just a room that you probably won't enter, i think it can even be -1

character[char2].x = 313;
character[char2].y = 181;

which changes player characters and sets the characters position.
otherwise I can't see any problems with just setting the character to what ever view you want.
Title: Re:How change view back?
Post by: frenchy_117 on Thu 22/05/2003 23:01:52
THis is my problem. I have it where you pick your own character at the bigining of the game. Now i also have it set up where the character becomes a car and i can have it set so that if you pick character 1 then you will change back to character 1 but if you character 2 and you get out of the car view then you will turn into character 1.
Title: Re:How change view back?
Post by: miguel on Thu 22/05/2003 23:08:27
how many characters are there?
use this script function to determine wich character is the playercharacter:

SetPlayerCharacter(char1);
  or
SetPlayerCharacter(char2);
 or
SetPlayerCharacter(car);
Title: Re:How change view back?
Post by: frenchy_117 on Fri 23/05/2003 14:50:56
I am going to explain this the best i can. At the beggining of my game the character is invisible so the you can pick a different character(Just changes view). then you go through the whole game as that character.Ie. Bussinessman, Bikergirl, ect. But when you get into a taxi or get a job as a taxi then your veiw will change into the taxi. But my problem is i can only set it so that when you get out nomatter what you do your guy will change to the first view.(this case is the bussinessman) so how can i change the veiw back to the ORIGANAL(meaning the veiw the player picked). ??? ??? ???
Title: Re:How change view back?
Post by: Scorpiorus on Fri 23/05/2003 15:23:53
Just use SetCharacterView() when your char represents a car and ChangeCharacterView() when he is a human.

player has chosen/changed his character:
ChangeCharacterView(EGO, 3);

player has got in a car (set temp view):
SetCharacterView(EGO, 5);

player has get out of a car:
ReleaseCharacterView(EGO);


Also when the player picks up a char you can use a global int to store it's current state (car, bussinessman, bikergirl, etc). Then you could check it later whenever you need.

-Cheers
Title: Re:How change view back?
Post by: frenchy_117 on Fri 23/05/2003 22:49:35
thanks