Page 1 of 1

Scope question

Posted: Sat Dec 10, 2005 1:00 am
by Ice Cream Jonsey
Does anyone recall the syntax of a test to determine if an object is currently in scope? For instance, I want the player to be able to access his phone if the phone is anywhere in the room. Something like

if phone.scope = true
then DoDesiredRoutine

or something like

if scope(phone)
then DoDesiredRoutine

... and the worst part is, I know I did this somewhere in Necrotic Drift, I just can't remember where. Heh. I think this is gonna be the thing I push off until morning, I'm all coded out tonight. ^______________________^[/quote]

Posted: Sat Dec 10, 2005 8:16 am
by Worm
Didn't Duffy have a phone in his inventory to ask for doors to be opened and shit?

Posted: Sat Dec 10, 2005 9:19 am
by Roody_Yogurt
Looking at the manual, it looks like you might want to use the in_scope property and maybe the PutInScope and RemoveFromScope routines.

Posted: Sat Dec 10, 2005 10:52 am
by Merk
CheckReach(object) -- defined in hugolib.h. I think it prints messages if the object can't be reached or isn't in the current room, so it might not be ideal if you're just wanting to do a test and print nothing. But it's the only thing I'm aware of that can check and see if an object is in scope.

Then again, FindObject() might do what you want. It returns whether the object is in the room or not, or whether it's accessible even if it is.

Posted: Sat Dec 10, 2005 1:04 pm
by Ice Cream Jonsey
Worm wrote:Didn't Duffy have a phone in his inventory to ask for doors to be opened and shit?
Yeah, though I think that was just a conduit to talk to Trott, who was elsewhere most of the game.

Posted: Sat Dec 10, 2005 1:05 pm
by Ice Cream Jonsey
Roody wrote:
Merk wrote:
Thanks guys - gonna go through and give those suggestions a shot right now.

Posted: Sat Dec 10, 2005 1:05 pm
by Ice Cream Jonsey
What happened to what I quoted?!?!

Posted: Sat Dec 10, 2005 1:22 pm
by Worm
Ice Cream Jonsey wrote:What happened to what I quoted?!?!
You should see if you can get Ogrish's phpBB template. It's the best one I've seen, and it is red and black.

Posted: Mon Dec 12, 2005 7:21 pm
by Ice Cream Jonsey
Worm wrote:
Ice Cream Jonsey wrote:What happened to what I quoted?!?!
You should see if you can get Ogrish's phpBB template. It's the best one I've seen, and it is red and black.
Ogrish, huh? Got a link?

Posted: Mon Dec 12, 2005 7:28 pm
by Roody_Yogurt
If this place takes ogrish's template, I totally will leave this place forever.

Posted: Mon Dec 12, 2005 8:43 pm
by pinback
I would like to see more execution videos here, though.

Posted: Tue Dec 13, 2005 2:04 am
by Lysander
Videos? Fuck you,