hi there
Im trying to make a function that I can call from a room script to spawn a npc character.
In a script module i have something that looks like this:
int spawnnpc(int npc, int view, int xpos, int ypos )
{
character[npc].changeview(view);
character[npc].changeroom(player.room, xpos, ypos);
}
Then:
I call this function in the "before fade in" section
It works fine up till the changeroom command; it seems to get stuck there.
Are you not allowed to use that command in a function? It works when I call the changeroom function seperately, which defeats the object of having a spawnnpc function.
Im trying to make a function that I can call from a room script to spawn a npc character.
In a script module i have something that looks like this:
int spawnnpc(int npc, int view, int xpos, int ypos )
{
character[npc].changeview(view);
character[npc].changeroom(player.room, xpos, ypos);
}
Then:
I call this function in the "before fade in" section
It works fine up till the changeroom command; it seems to get stuck there.
Are you not allowed to use that command in a function? It works when I call the changeroom function seperately, which defeats the object of having a spawnnpc function.