I'm having trouble with these new pointer things in AGS.
if (hotspot[Hotspot.GetAtScreenXY(mouse.y, mouse.y)].GetProperty("Direction") == 0) cur_mode = 0;
And it won't let me. In the older versions I could do this:
if (hotspot[GetHotspotAt(mouse.y, mouse.y)].GetProperty("Direction") == 0) cur_mode = 0;
Could someone please help me fast. Maybe this thread should be moved to the beginner's technical forum, too. :P
Fast fast fast? := Ok, here's a fast help:
Hotspot *hot=Hotspot.GetAtScreenXY(mouse.y, mouse.y);
if (hot.GetProperty("Direction") == 0) cur_mode = 0;
Pity that it has to go in two lines. Me, I'm still waiting for the feature that lets us go,
if (Hotspot.GetAtScreenXY(mouse.y, mouse.y).GetProperty("Direction") == 0) cur_mode = 0;
Quote from: Rui "Brisby" Pires on Thu 02/06/2005 07:42:51
Fast fast fast? := Ok, here's a fast help:
Hotspot *hot=Hotspot.GetAtScreenXY(mouse.y, mouse.y);
if (hot.GetProperty("Direction") == 0) cur_mode = 0;
Pity that it has to go in two lines. Me, I'm still waiting for the feature that lets us go,
if (Hotspot.GetAtScreenXY(mouse.y, mouse.y).GetProperty("Direction") == 0) cur_mode = 0;
Can't believe I didn't think of that. Thanks so much for the quick reply!
Getting used to the new stuff in 2.7 is hard. But it makes more sense and is cooler... :)
Quote from: Geoffkhan on Thu 02/06/2005 07:36:56
Maybe this thread should be moved to the beginner's technical forum, too. :P
You're right probably. Also, descriptive topics.
Quote from: Gilbot V7000a on Thu 02/06/2005 07:45:57
Quote from: Geoffkhan on Thu 02/06/2005 07:36:56
Maybe this thread should be moved to the beginner's technical forum, too. :P
You're right probably. Also, descriptive topics.
Heheh, thanks so much.
But see, I added an extra 'g' to the "arggh." :P
Won't happen again.
Still need help...
I did a little test, like this:
Hotspot *walk = Hotspot.GetAtScreenXY(mouse.y, mouse.y);
walk.GetName(buffer);
lblStatus.SetText(buffer);
So that way it will display the name of whatever hotspot in a GUI. This is purely as a test.
It doesn't seem to be getting the right hotspot positions and stuff... almost like there are pieces of each hotspot strewn around. This is really weird. Arggh!
Er, if that's a direct copy/paste, you got mouse.y twice instead of mouse.x,mouse.y...
Quote from: Rui "Brisby" Pires on Thu 02/06/2005 09:03:47
Er, if that's a direct copy/paste, you got mouse.y twice instead of mouse.x,mouse.y...
...
I think I will go commit seppuku. Please excuse me.
I will cherish this as a classic moment. (Mouse.y, mouse.y). Brilliant. Genius. I seriously spent nearly 2 hours over this problem.
Let this be a lesson to you, kiddies.
EDIT: Must've been all this cranberry juice I've been drinking to keep myself awake. Clogged my brain passages, it did.
What is seppuku? If it's some dark ritualistic ceremony count me in!
EDIT - Go to sleep. :) Those are the kind of mistakes we make when it's 1am, we NEED to go to sleep, but we still want to figure out just that one more line of code. Just Say No!
offtopic: As far as I know, seppuku is, what we usually call hara-kiri.
Or something like that. ;)
even more offtopic: Sounds like fun.