Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Edwin Xie on Mon 10/05/2004 01:33:27

Title: Demo - How did roger open that object "door"?
Post by: Edwin Xie on Mon 10/05/2004 01:33:27
You know when I talked to roger, he opened the door. Right? If you don't get it then you might have not explored the whole demo game or anything under that. If you didn't know I was talking about the demo game then here it is, the demo game. Now, back to the main point, when he opened the door to the darkness (unfinished?!?!?!?!?!) how did he open that door? Please! That could be useful if you tell me!
Title: Re: Demo - How did roger open that object "door"?
Post by: Edwin Xie on Mon 10/05/2004 03:38:10
Now are you guys happy? Now please explain to me how roger in room 10 in the demo opened that door (or whatever, that door seemed like it opened by itself.)
Title: Re: Demo - How did roger open that object "door"?
Post by: Scummbuddy on Mon 10/05/2004 06:11:26
check out 'objectOn' in the manual. let us know what you think.
Title: Re: Demo - How did roger open that object "door"?
Post by: Edwin Xie on Mon 10/05/2004 06:27:59
It says:

ObjectOn
ObjectOn (int object)

Turns object number OBJECT on. It may have been turned off previously with ObjectOff or may have been set initially off in the editor.
Example:

ObjectOn(5);

will make object 5 of the current room appear.
See Also: IsObjectOn, ObjectOff


I don't get it. Can you please show me an example on how to use it? And how did those other posts by other people go?
Title: Re: Demo - How did roger open that object "door"?
Post by: InCreator on Mon 10/05/2004 06:34:43
You're weird. And too aggressive.
What's so difficult here? Make a room. Insert object there. There's special button and menu item for objects. When used "ObjectOff" command somewhere, object disappears, so player can't use, look, speak or see that anymore. ObjectOn turns it on again.

Door was an object in that room and with Objectoff command, it stopped to be drawn at the screen and blocking roger to walk into darkness that was behind door object.

People here are not paid to help you. So be polite.
Title: Re: Demo - How did roger open that object "door"?
Post by: Scummbuddy on Mon 10/05/2004 06:35:15
Heh. Well, for instance, in your background, you could have your door drawn closed, and then create another image, that, when placed on top of the door, will make it look like the door is open. When your character has selected "open door" turn the object on, so that it looks like the character has opened the door, and then you can possibly even see some of the next room through the "open doorway"

you could of course draw the doorway open on the background. and then have an object with a sprite/image that will be turned on or off depending on the characters actions.
Title: Re: Demo - How did roger open that object "door"?
Post by: Ashen on Mon 10/05/2004 12:36:32
Like someone said last night, before the thread was moved, look it up in the editor. Took me about 3 minutes, including downloading the demo game. Lines 26 - 31 of room 10's 'repeatedly execute' script:

DisplaySpeech(ROGER,"Let me open this for you.");
  RestoreWalkableArea(2);
  MoveObjectDirect(1,90,66,1);
  PlaySound(3);
  Wait(60);
  ObjectOff(1);

Although, Scummbuddy and InCreator's ways are easier.
Title: Re: Demo - How did roger open that object "door"?
Post by: Edwin Xie on Tue 11/05/2004 05:26:15
Ok..... All I need to do is figure out the animation..... Because I am burning something in my game you know.
Title: Re: Demo - How did roger open that object "door"?
Post by: on Tue 11/05/2004 14:27:29
Hey, I was actually wondering the same question--how do you do that???
Title: Re: Demo - How did roger open that object "door"?
Post by: Ashen on Tue 11/05/2004 14:35:46
Try the tutorial thread, specificly:

http://www.agsforums.com/acintro7.htm

Between this and the editor help file, you should be able to figure it out.