嘿,伙计们,我试着实现一个照相机:
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
在这个例子中,只有一个带有一个胶卷的照相机。
但我想要两个不同的相机,这两个相机应该有一个单独的胶卷。
,这样我就可以用camera#1保存到filmroll#1,也可以用camera#2拍摄照片,这些照片都保存在“filmroll#2”中。
有人能帮我吗?
发布于 2022-06-20 17:30:49
我想你可以用化名来做这个。我已经有一段时间没有在“通知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".你会有两个相机,显示为相同的东西,但是不同的。你也可以用胶卷做同样的事情。你可能仍然有问题,知道哪个相机是谁,但希望这能让你在正确的轨道上。
https://stackoverflow.com/questions/72584153
复制相似问题