Hi im pedro, from spain. I just begin one week ago with AGs. I read all the info, tutorials etc and i started with a little game, using the default template.
I include a lot of rooms, created some basic-aspect characters (all them with animations), a lot of nice conversations, etc etc. The work was easy (i found the necessary info without came here) and i were including a lot of functions to learn to try to create a very complete game next time (i already have intro, a lot of cutscenes, personal GUI's, dinamyc conversations, NPCs always animated when they are idle and a long etc)
But i have a trouble now. I want create a cutscene where a NPC comes from another room to speak with the main character, but im unable to do that. I use the editor panel, but the NPC appears in the current room in the same coordinates where he was in the other room (unlucky, a nonwalkable area). I tried to move him first before call, but looks like he do not move and always comes in the same position or i get an error (character is not in the current room).
I search for modues and plugins, and i found Character control, but looks TOO complicate, specially since i always get an error when i include it (getgraphicalx expected).
Anyone could help me with this? I really could finish the game without that cutscene (i could put the scene in the same room where the NPC is) but i really want create very intercative games and this is a very important tools i need learn
Thanks
Pedro (30 yo)
PS I had years of experience in Turbo Pascal, so scripting is not a trouble for me.
Quote
I use the editor panel, but the NPC appears in the current room in the same coordinates where he was in the other room (unlucky, a nonwalkable area).
By 'editor panel' do you mean the Interaction Editor, as in you're using the 'Character - Move NPC to different room' command? There's no way to do what you want in the Interaction Editor, you're going to have to use scripting, the Character.ChangRoom (http://www.adventuregamestudio.co.uk/manual/Character.ChangeRoom.htm) command. If you don't have a problem with scripting, I'd recommend you start using it as soon as possible - as you've just seen, there's a lot that can't be done in the Interaction Editor.
Quote from: Ashen on Thu 22/03/2007 10:32:15
By 'editor panel' do you mean the Interaction Editor, as in you're using the 'Character - Move NPC to different room' command?
Yes, i were talking about the interaction editor. I will try with some script using character.changeroom and i will let you know. Thanks.
EDIT:
character[charactername].changeroom (roomnuber,xpos,ypos) works perfect for me. Thank you for the tip.
JpGames
Btw, you don't need to use the character[] array, cCharactername will work, too.
Quote from: KhrisMUC on Thu 22/03/2007 21:25:23
Btw, you don't need to use the character[] array, cCharactername will work, too.
cCharactername.changeroom(roomnumber,xpos,ypos) also works fine. But i prefer use the array mode since im used into turbo pascal sintax. Thanks a lot :D
JpGames
I just want add that i included a empty view. I first change the view fo the NPC i want call for the empty one; then i call the NPC with changeroom to the current room and i can do a lot of things before change its view to the normal view (for example, facelocation, faceplayer...) It looks more professional..
That's a pretty neat solution. I think you could also do it by moving the NPC to another room at the right coords, running the appropriate commands and then bringing them back. It'd save a View, if you're likely to be pushing the 600 limit, or if you just didn't want the empty view.
I'm not sure how FaceLocation and similar stuff would behave if the NPC isn't in the current room.
But it can be done without an empty view nonetheless:
cNpc.Transparency=100;
...
cNpc.Transparency=0;
Good point - FaceCharacter won't work if the Characters are in different rooms. It can be pretty easily worked around, using cNpc.FaceLocation(player.x, player.y) (FaceLocation has always worked OK for me on characters not in the current room), but the Transparency thing is probably safer.
Transparency works great too :) Its better, because i dont need spend one view in a empty image. Its not important for the little game im creating now (i have enough free views) but could be usefull for bigger games.
Thanks a lot
JpGames