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.
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.
youve known ags editor longer than me
anyway thanks
edit:that didnt work
It should do, maybe you should paste your code so we can help you?
// 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
try putting the run script first
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.
ah yes, that is a good point, is UTURN IN the room you are moving too???
also, yes, you dont need the goto room
thanks i will get working soon.
it still dosent work!
cant you give us more info that that? what was the error?
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!
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)?
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.
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.
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.
in room 2s hotspot i have put
do the following comand
character-set character view
where:
character:UTURN
view number:0
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.
were is the player enters screen before fade in option
at the end of the list of Interaction Options for the room
in what section of the room editor is that
under the first tab (in the room editor section) click the 'I' button
thanks everone that worked i will add you to my credits cause this was the main part of my game.
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.
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.
i never thought of thati will get that done as soon as possible although it means adding extras to my room.
Well it's not like AGS is hard to learn, there's just a lot to learn...
ur that didnt work either the whole option thingy is not working
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.
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.
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
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.
he thats great .although i now know how to do that :)