Changing Rooms

Started by nuksies, Thu 14/02/2008 19:06:21

Previous topic - Next topic

nuksies

How do you script a room change if the character clicks a hotspot or walks on a hotspot or goes over the edge.

I've just started using AGS and i have no clue so sorry if its REALLY obvious!!!

GarageGothic

Did you even check the manual? The function you need is Character.ChangeRoom(int room_number, optional int x, optional int y)

nuksies

told you it would be a REALLY obvious answer but i search everywhere on the internet for it
Thanks a lot

Khris

Don't search the internet but open the help file (by pressing F1). Then start with the tutorial.

Dualnames

Select that hotspot you want and open interactions. Right click on player stands on hotspot and select new run script function then add the line:
NewRoomEx(2,150,150);

//2 is the where  the character will go to and 150 150 is x,y coordinates.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

That's old code, which is obsolete since 2.7. Using "stand on hotspot" is also obsolete, it's better to use regions.

.M.M.

And there is no interaction editor in AGS 3.0, also.

Dualnames

Okay, forgot that obsolete thing... Good job pointing out. I assumed you were using AGS 2.72
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

BOYD1981

one thing worth remembering about using regions to change rooms is that you want to set the co-ords a few pixels to the outside of the region, i made that mistake a long time ago and my character just kept moving between the rooms and there was nothing i could do to stop it.

Limey Lizard, Waste Wizard!
01101101011000010110010001100101001000000111100101101111011101010010000001101100011011110110111101101011

SMF spam blocked by CleanTalk