
how to modify an object in a table in inform 7
I want to share a trick I learned handling inform7 stories when you want to make debug commands
unresolvecheat is an action applying to one topic.
understand "unresolve [text]" as unresolvecheat.
carry out unresolvecheat:
repeat with X running from 1 to number of filled rows in Table of GameEventIDs:
choose row X from the Table of GameEventIDs;
if Name entry exactly matches the text topic understood, case insensitively:
now Object entry is unresolved;
break;
the above code functions to modify the property of an event in the table of GameEventIDs
so that the player can attempt it again.
at first I was having trouble because i couldnt figure out how to modify a property of a selected row but then i figured out the answer was Object entry. This is important because X which is what i attempted to use at the start is not the object but the index of the object in the table.
ergo I attempted to make this line work
now X is unresolved;
but it was syntaticly invalid
Leave how to modify an object in a table in inform 7 to:
Read more #programming posts
Best Posts From jfmherokiller
We have not curated any of jfmherokiller's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From jfmherokiller
- how to use vtnetcore in a commandline app
- how to access the firebase database emulator from the .net implementation of the realtime database
- tips for deserializing json using newtonsoft.json
- a tip for programming when dealing with databases
- A way to extract strings from the body of a method in c#
- a helpful template for cmake if you are trying to upgrade a project which uses autoconf
- A method of fixing the fps issues in deadly premonition 2
- how the money value is stored in deadly premonition 2
- I implmented gmcp and mdsp support in protomuck
- A short list of gripes I have with lua as a language