Inform7相机有两个不同的胶卷



嘿,伙计们,我试图实现一个相机:

A photograph is a kind of thing. 36 photographs are in the film roll.
Appearance relates one thing to various photographs. The verb to be shown by means the appearance relation.
The description of a photograph is usually "It shows [a random thing which is shown by the item described]."
Understand "of [something related by reversed appearance]" as a photograph.
This allows the player to refer to any photograph by its subject: useful if we have a large number of them.
Now we create an action to let the player use the camera and generate these photograph objects:
The player carries a cheap instant camera.
Understand "photograph [something] with [camera]" as photographing. Understand "photograph [something] with [something preferably held]" as photographing. Photographing is an action applying to one visible thing and one carried thing, requiring light.
The photographing action has an object called the selected film.
Setting action variables for photographing:
let N be a random photograph in the film roll;
now the selected film is N.
Check photographing:
if the second noun is not the camera, say "You need a camera for that purpose." instead.
Check photographing:
if the noun is the camera, say "Sadly impossible." instead.
Check photographing:
if the selected film is nothing, say "You're out of film." instead.
Carry out photographing:
now the noun is shown by the selected film;
move the selected film to the player.
Report photographing:
say "Your camera instantly spits out [a selected film]."

如例322:http://inform7.com/book/RB_9_12.html

在这个例子中,只有一台相机和一个胶卷。

但是我想要两台不同的相机,两台相机都应该有一个单独的胶卷。

所以我可以用相机#1拍摄保存到胶卷#1的照片,我可以用相机#2拍摄保存到胶卷#2的照片。

有人能帮我吗?

我认为你可以用别名来做到这一点。我在Inform 7中编写代码已经有一段时间了,但我相信语法类似于:

The player carries a first camera.
The printed name of first camera is "cheap instant camera".
There is a second camera in the lab.
The printed name of second camera is "cheap instant camera".

你会有两个相机显示相同的东西,但是不同的。你也可以对胶卷做同样的事情。你可能仍然不知道哪个相机是哪个,但希望这能让你走上正确的轨道。

相关内容

  • 没有找到相关文章

最新更新