Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: mousemat on Mon 23/08/2004 12:17:58

Title: changing to another character- solved
Post by: mousemat on Mon 23/08/2004 12:17:58
i am working on a game called sunrider .
i have a problem .what i want to happen is when you walk outside you automaticly turn into a speed boat.i have all the right characters and i have read the manual but i still dont know how to do it.
Title: Re: changing to another character
Post by: Mr Jake on Mon 23/08/2004 12:30:54
well, after searching 'change player character' and clicking on the very first thing in the list and then skiming over the list of commands in the help entry I found
SetPlayerCharacter (CHARID)

took what, 30 seconds :/

btw: I did already know this command I just wanted to see how much he actual searched the manual.
Title: Re: changing to another character
Post by: mousemat on Mon 23/08/2004 12:36:36
youve known ags editor longer than me
anyway thanks

edit:that didnt work
Title: Re: changing to another character
Post by: Mr Jake on Mon 23/08/2004 14:39:17
It should do, maybe you should paste your code so we can help you?
Title: Re: changing to another character
Post by: mousemat on Mon 23/08/2004 14:43:14
 // script for hotspot1: Interact hotspot
SetPlayerCharacter(UTURN);Ã, 

uturn is the name of the speedboat
this is ment to make the character into a speedboat.

i have put:

interact with hotspot
player-go to room 2
run script

is that right
Title: Re: changing to another character
Post by: Mr Jake on Mon 23/08/2004 15:43:17
try putting the run script first
Title: Re: changing to another character
Post by: Ashen on Mon 23/08/2004 16:02:26
I don't think you actually need the 'Player - go to room 2' command, since SetPlayerCharacter automticaly moves you to the room the new character (UTURN) is in. You just have to remember to use the 'Character - Move NPC to different room' command to position the other character to a new room, when you're done in the boat.

Alternatively, you could use 'Character - Set character view' when you enter room 2, to make the current character look like a speed boat. This might be a little easier than SetPlayerCharacter, as you won't have to move and re-position an NPC when you leave room 2.
Title: Re: changing to another character
Post by: Mr Jake on Mon 23/08/2004 16:06:03
ah yes, that is a good point, is UTURN IN the room you are moving too???

also, yes, you dont need the goto room
Title: Re: changing to another character
Post by: mousemat on Tue 24/08/2004 20:05:00
thanks i will get working soon.

it still dosent work!
Title: Re: changing to another character
Post by: Mr Jake on Tue 24/08/2004 20:31:44
cant you give us more info that that? what was the error?
Title: Re: changing to another character
Post by: mousemat on Tue 24/08/2004 20:41:49
theres nothing to explain i did exacly what ashen told me to do but nothing worked.
as soon as i leave to first room to get on the boat i start walking on water!
Title: Re: changing to another character
Post by: Ashen on Tue 24/08/2004 20:50:54
Well, I said two different things, which one did you do?
What interactions do you have for leaving room 1 (and what script, if you're using a runscript)?
Title: Re: changing to another character
Post by: mousemat on Tue 24/08/2004 21:02:08
when leaving room one i put go to room 2 then in room 2 i put stand on hotspot-character-set character view-uturn

i got a bit confused with hotspots posts that i think i have done it wrong somewhere.
Title: Re: changing to another character
Post by: Ashen on Tue 24/08/2004 21:07:37
Try:
Room 1 hotspot (or whatever)
  Go to room 2
(exactly as you have now)

Room 2
     Player enters screen (before fade in)
          Character - Change character view (EGO, UTURN)
(you mayhave to use the view number for this, rather than the name)

See if that works any better.
Title: Re: changing to another character
Post by: dikla on Tue 24/08/2004 21:10:08
If I undersatnd correctly when the player leaves the room he turn into UTURN?
If so, this is simple. what you have to do is when the player leaves the room you should specific just go to room 2. in room 2 you should put in SETTING - first time player enter the room - change character view (EGO, view no of the UTURN). I tried it and it should work.
Title: Re: changing to another character
Post by: mousemat on Tue 24/08/2004 21:16:52
in room 2s hotspot i have put

do the following comand
character-set character view

where:
character:UTURN
view number:0
Title: Re: changing to another character
Post by: Ashen on Tue 24/08/2004 21:26:27
I meant what dikla said, but she might've put it better.

DON'T USE A HOTSPOT IN ROOM 2, use the Player enters screen (before fade in) interaction and make it:

do the following comand
character- Change character view


where character : Main player character (EGO),
view number: Motorboat walking (sailing? whatever) view (UTURN).
NOTE: don't use 'set character view'

This way, you're not actually changing the character, just how the character looks. You could use different characters, but that's a lot harder to manage without scripting everything.
Title: Re: changing to another character
Post by: mousemat on Tue 24/08/2004 21:29:20
were is the player enters screen before fade in option
Title: Re: changing to another character
Post by: Mr Jake on Tue 24/08/2004 21:29:57
at the end of the list of Interaction Options for the room
Title: Re: changing to another character
Post by: mousemat on Tue 24/08/2004 21:31:55
in what section of the room editor is that
Title: Re: changing to another character
Post by: Mr Jake on Tue 24/08/2004 21:32:43
under the first tab (in the room editor section) click the 'I' button
Title: Re: changing to another character
Post by: mousemat on Tue 24/08/2004 21:35:27
thanks everone that worked i will add you to my credits cause this was the main part of my game.
Title: Re: changing to another character-NOT solved
Post by: mousemat on Wed 25/08/2004 10:08:26
after i had done the changing it i made the boat turn back into a person when he walked on land then he had to do another corse (in a different room..the sea)and i put in character enters screen before fadin
-change character view-UTURN

but it didnt work.i checked it with the other change i did that worked and its exacly the same.
Title: Re: changing to another character-NOT solved
Post by: on Wed 25/08/2004 11:14:51
How about this:

In the room editor where you want the character to walk, use type 1 (blue) walkable areas, and set "Change player view while on this area:" to your walking view. In the areas with the speed boat, use type 2 (green) walkable areas, and set your character view to the speedboat. You wouldn't really have to use the 2 different types of walkable areas, but if you do you're a lot less likely to get confused, and you can create something like a dock or something where the player can walk or be in the boat in the same room. Hope this helps.
Title: Re: changing to another character-NOT solved
Post by: mousemat on Wed 25/08/2004 11:31:18
i never thought of thati will get that done as soon as possible although it means adding extras to my room.
Title: Re: changing to another character-NOT solved
Post by: on Wed 25/08/2004 12:29:22
Well it's not like AGS is hard to learn, there's just a lot to learn...
Title: Re: changing to another character-NOT solved
Post by: mousemat on Wed 25/08/2004 16:46:39
ur that didnt work either the whole option thingy is not working
Title: Re: changing to another character-NOT solved
Post by: SilverWizard_OTF on Thu 26/08/2004 12:57:08
You do not explain your situation very well. Does your character change room,  or it just goes to an area of the same room, and there it  gets turned into a boat?

For the first possibility:   (To the room where your character will be a boat)
Interaction editor--> Character Bofore fade in-->  runcript( SetCharacterView //So to change character's appearance to a boat).

For the second possibility: Create a region in the area where your character should be turned into a boat. And go to this Region's interaction editor:  While player stands on region--> Run script (SetCharacterView //So to change character's appearance to a boat)>

I hope i helped a bit.
Title: Re: changing to another character-NOT solved
Post by: Ishmael on Fri 27/08/2004 08:40:29
I have gotten confused of what your problem actually is... could you list it out?

Like:
- Character goes to other room -> turns into a boat
- When player want's "out" of the boat, return to prev room -> change back to player character

Or what? and include what is not working, and post the codes you have made, and list what you've put in the interaction editor, so we might get a better picture of your problem.
Title: Re: changing to another character-NOT solved
Post by: mousemat on Fri 27/08/2004 09:19:19
Quote from: Ishmael on Fri 27/08/2004 08:40:29
Like:
- Character goes to other room -> turns into a boat
- When player want's "out" of the boat, return to prev room -> change back to player character

thats right i think the set player character is not working.
silverwizards idea didnt work my character still walks on water after he has left the room
Title: Re: changing to another character- solved
Post by: Ashen on Fri 27/08/2004 11:43:12
Like Ishmael, I'm a little lost as to where exactly your problem is, and also which way you're trying to do it anyway.

I've uploaded a small test game (just the AGS files to keep the size down) that shows the 3 basic ways I think you could be using:
http://www.2dadventure.com/ags/Change.zip

Have a look at it (sorry about the graphics, I put them together in about 5 mins), and see if it's any use.
Title: Re: changing to another character- solved
Post by: mousemat on Fri 27/08/2004 21:28:38
he thats great .although i now know how to do that :)