Hey guys i try to implement a camera:
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]."
Like in Example 322: http://inform7.com/book/RB_9_12.html
In the example there is only one camera with one film roll.
but i want two different cameras and both cameras should have a individual film roll.
So i can take pictures with camera#1 saved to filmroll#1 and i can take pictures with camera#2 which are saved to "filmroll#2".
Can somebody help me?
I think you could do this with aliases. It's been a while since I coded in Inform 7, but I believe the syntax is something like:
You would have two cameras that display as the same thing, but are distinct. And you could do the same thing with the rolls of film. You might still have issues knowing which camera is which, but hopefully this gets you on the right track.