ChangeRoom function being called by AnyClick() not working

Started by herecomesfran, Thu 24/10/2013 21:16:53

Previous topic - Next topic

herecomesfran

Hi! I am just starting to learn AGS. My game doesn't have a main character that is being displayed and I am having a hard time figuring out how I can trigger events without the character crossing edges etc.

I wrote the following line of code, hoping that once the player clicks a certain hotspot, the function would get called and the game would move on to the next room. Sadly it's not working and I don't understand why.
Code: ags

function pcScreenSelect_AnyClick()
{
player.ChangeRoom(3);
}


I'd appreciate your help!

Khris

Did you start an empty game or a default game?
Are you clicking the hotspot with the WalkTo cursor? Because that one won't trigger any click events. If you are, change the mouse mode in the room's before fadein event using   mouse.mode = eModeInteract;
The only other thing I can think of right now: did you properly link the function to the event? (you said you wrote "the following line", so I assume the function was created by AGS, right?)

SMF spam blocked by CleanTalk