how do i make the player change map on my game[solved]

Started by emilygamemaker, Fri 17/07/2009 18:59:55

Previous topic - Next topic

emilygamemaker

how do i make the player change map on my game

emilygamemaker

everybody,please answer,i really need help

Matti

Perhaps you could post a question that makes sense then?

emilygamemaker

like,when you're a the end of the screen,you change map,how do i do that

Matti

If you want to change the room, use the player.changeroom command.

If not, tell us what you mean by "map"..

emilygamemaker

what's the player change room command
and by map,i mean room

Matti

cWhoever.Changeroom(3,100,100) will transport the character "Whoever" to room 3 at the coordinates 100,100.

Please read the manual and do the tutorial.


Vince Twelve

#8
Oh dear...  :-X

Emily,

When you have AGS open, press the F1 key.  This will open the manual.  The manual contains a beginner's tutorial (under the contents tab) which you should go through to learn how to get started.  It includes information about changing rooms.

For us to help you, please invest a little time and effort first.  It'll help you and help the people helping you.

To specifically answer your question, when editing the room, click the "Show this room's:" drop down and choose "edges." Then drag the edges to the appropriate place in your room.  Then, on the sidebar, find the little button that looks like a lightning bolt.  Then click "walks off bottom/left/top/right" (whichever one you want) and click the little "..." button next to it.  This will open up the script for the room and add a function that will be run when the player walks past the appropriate edge.  Then add the script that Mr. Matti so kindly provided for you, but change "cWhoever" to the script name of your character and the "3, 100, 100" to appropriate numbers for what you're trying to accomplish.

That will all make a lot more sense after you invest the time and effort to go through the tutorial.

Edit: Also, it is bad etiquette on this forum to post a second time to say "hurry answer my question!" especially after waiting only eight minutes.  Do not double post.  And DEFINITELY do not post in a completely unrelated post to urge people to answer your question.  Look on this board, you would be hard pressed to find any one who had a question that was not answered in a few hours.  Have some patience.  Finally, make sure to search the manual and this forum before you post a question, as your question has probably already been answered somewhere, and thus, you don't need to wait at all.  (IANAM)

emilygamemaker

i still don't know what to type in on the script

Akatosh

cCharacter.ChangeRoom(room, x-coordinate, y-coordinate);

But replace "Character" with the name of the character you want to move, x-coordinate with the, well, x-coordinate of the spot you want it to appear at ("distance from the left edge of the room in pixels") and vice versa for y-coordinate.

As has been said numerous times.

Do you even speak English?

Vince Twelve

Or if you want to move the player, then you can just change "cCharacter" to "player".

Seriously, this is all in the tutorial.  Take a look!  We can't help you any more than that until you help yourself.  Sorry.

Ghost


emilygamemaker

i solved it,but i did look at the manual,but i just could'nt find it

Khris

The first three menu options in the help menu all open the manual. :=

TerranRich

Emily, there are tutorials in the sticky threads in this forum, as well as inside the help manual itself. Please read them first.

Yes, I know I'm not a moderator, but I used to be, and I wrote those sticky threads.
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk