So I'm trying to make a dungeon and I want to have 2 different responses when I enter the one room but I thats as far as I can get. How do I get 2 different outcomes from 1 file?
So when you open a file for the first time I want it to display a specific content, when you return to that file and reopen it I want it to display a different content. However, both contents are in the same file. Just want one content to read for the first visit and the second content to read upon repeat visits.
Is it possible to have two separate outputs to one file. Example, if you run the file below for the first time you get the response of "sup sup" and if you were to run it a second time you would get the "no no" response. This is just an example but thats what I'm trying to get at. So how exactly can I manage that?
this=1
if [ "$this"=="1" ]; then
echo "sup sup"
let "this=$this - 1"
fi
if [ "$this"=="0" ]; then
echo "no no"
fi