I tried to use Khris's GotThere module, but it looks like I won't be able to understand it myself and I think that it is a little bit changed since latest mentions of this module in this forum. So here's my function:
function hGoLeft_Interact()
{
if(!WalkFace(90, 660, eLeft))
{
player.ChangeRoom(2, 1320, 700);
}
}
I'm just trying to change room when player reaches coordinates (90, 660), but when I click on hotspot, player moves to coordinates (mouse.x, mouse.y) and don't change room. Maybe I just use wrong function or just don't know how to use it correctly. As I understand, bool GotThere and function GoFace doesn't exist anymore. Hopefully, module's author will be able to help me
This is how generally I do when using this module:
function hGoLeft_Interact()
{
if (!GotThere()) GoFace(90, 660);
else
{
player.ChangeRoom(2, 1320, 700);
}
}
But that doesn't work for me, because error "undefined symbol 'GotThere'" shows up. Do I need to write something more somewhere else or am I using wrong version of this module?
Quote from: MonkeySyrup on Fri 21/06/2019 18:29:36
But that doesn't work for me, because error "undefined symbol 'GotThere'" shows up. Do I need to write something more somewhere else or am I using wrong version of this module?
I have GotThere module version 0.2. In the module header I have this:
enum Dir {
eLeft,
eRight,
eDown,
eUp
};
import void GoFace(int go_x, int go_y);
import bool GotThere();
I don't know maybe you have an early version of the module?
Oh, mine shows
enum Dir {
eLeft,
eRight,
eDown,
eUp
};
import bool WalkFace(int x, int y, Dir d);
I'll search for 0.2 version then
Quote from: MonkeySyrup on Fri 21/06/2019 18:35:47
Oh, mine shows
enum Dir {
eLeft,
eRight,
eDown,
eUp
};
import bool WalkFace(int x, int y, Dir d);
I'll search for 0.2 version then
Okay, in case you will not find it here it is: http://www.fileconvoy.com/dfl.php?id=g3cf0cdce9ab62bc21000177800e1bd3ad3a5abdb1b
Thanks for help!
You are welcome!
For the current version you don't need the !:
function hGoLeft_Interact()
{
if(WalkFace(90, 660, eLeft))
{
player.ChangeRoom(2, 1320, 700);
}
}
Oh, so that's what I was doing wrong. Now I'll know. Thanks!