Getchar, If, and all things nasty

Started by Nixxon, Tue 09/03/2004 15:10:40

Previous topic - Next topic

Nixxon

Howdy :)
I'm having trouble getting my EGO to speak after he reaches a certain location. I've tried a number of methods to no avail. Here's what seems to be the best possible sollution i could think of.

// script for room: Repeatedly execute
GetCharacterAt(220, 200);
if(GetCharacterAt(220, 200) == 1) {
DisplaySpeech (EGO, "Well lick my pouch and call me a peasant");
}  

But no cigar? And clues? Thankis :D  8)

SSH

If you have pixel-perfect click detection on and 220,200 happens to be a transparent pixel, this may be why it isn't working. How about:

if ((player.x==220) && (player.y==200)) {
DisplaySpeech(EGO, "just procreating work female genitalia");
}

12

TerranRich

And why did you put "GetCharacterAt" twice?
Status: Trying to come up with some ideas...

Nixxon

Quote from: terranRICH on Tue 09/03/2004 15:18:55
And why did you put "GetCharacterAt" twice?
The "manual" implied I had to.

Thanks SHH, just pasted your code but alas -
 // script for room: Repeatedly execute
if ((player.x==220) && (player.y==200)) {
DisplaySpeech(EGO, "just procreating work female genitalia");
}

Runtime error: function still open, missing "}"

Odd since the "}" is there in tact  ??? :-\
Any ideas? Really appreciated :)


SSH

Did you delete the functions's "}" as well? Edit the whole room script using "{}" button on room main page and then check that there a re TWO closing braces after the DisplaySpeech (assuming nothing else in room rep_ex...)

I just checked the manual's entry for GetCharacterAt and I can't see anything about putting it twice.
12

Nixxon

Cheers SSH :)
It was not so boldly stated in the if/else statments page, I understand it's hard to imagine reading the manual through lamens eyes. It sometimes tends to leave you less knowledgeable than when you started reading it. Then again, maybe I have shit for brains? S'all good ;)

SMF spam blocked by CleanTalk