SlideShare a Scribd company logo
1 of 1
Download to read offline
Lesson notes - 11.03.13
Twine- In more detail.
To set a variable in twine you use ʻsetʼ and you are able to name it as anything as long as
you put a ʻ$ʼ before it.
Silently tells the computer to use the code given, so without it the code is insufficient.
<<silently>>
<<set $name = "prompt("What's your name?")>>
<<endssilently>>
<<print $hello>> - this will allow to get get variables and print they on screen, with this
you could set up a loop to help make the game more continuos
var gold = 0; (JavaScript)
<<set $gold >> (Twine)
These two codes set variables but just in different programs, the first in JavaScript and the
second in Twine.
How to do Conditionals in Twine compared to JavaScript.
if(gold ==1){ (JavaScript)
buy the sword
}
else}
no sword for you
}
<<if $gold eq 0>>
You have no money, traveller_ (Twine)
<<else>>
You have a new sword, traveller_
<<endif>>

More Related Content

Viewers also liked (9)

Etapas artisticas.pptx2
Etapas artisticas.pptx2Etapas artisticas.pptx2
Etapas artisticas.pptx2
 
The Concurrent Constraint Programming Research Programmes -- Redux (part2)
The Concurrent Constraint Programming Research Programmes -- Redux (part2)The Concurrent Constraint Programming Research Programmes -- Redux (part2)
The Concurrent Constraint Programming Research Programmes -- Redux (part2)
 
Ballot paper prop
Ballot paper propBallot paper prop
Ballot paper prop
 
Task 2 game setting
Task 2 game settingTask 2 game setting
Task 2 game setting
 
Zahoor
ZahoorZahoor
Zahoor
 
Parkimiskell promoleht (2)
Parkimiskell promoleht (2)Parkimiskell promoleht (2)
Parkimiskell promoleht (2)
 
Katrina Heath - Cert IV OHS
Katrina Heath - Cert IV OHSKatrina Heath - Cert IV OHS
Katrina Heath - Cert IV OHS
 
Dia da Alimentação
Dia da AlimentaçãoDia da Alimentação
Dia da Alimentação
 
NARESH1
NARESH1NARESH1
NARESH1
 

More from Lucy Taylor

Red dead redemption marketing mix
Red dead redemption marketing mix Red dead redemption marketing mix
Red dead redemption marketing mix
Lucy Taylor
 
Red run marketing plan
Red run marketing planRed run marketing plan
Red run marketing plan
Lucy Taylor
 
Presentation feedback questionnaire
Presentation feedback questionnairePresentation feedback questionnaire
Presentation feedback questionnaire
Lucy Taylor
 
Youtube header idea 2 feedback
Youtube header idea 2  feedbackYoutube header idea 2  feedback
Youtube header idea 2 feedback
Lucy Taylor
 
Bbfc research task a01
Bbfc research task a01Bbfc research task a01
Bbfc research task a01
Lucy Taylor
 
Press complaints commission
Press complaints commissionPress complaints commission
Press complaints commission
Lucy Taylor
 
Libel worsheet a06
Libel worsheet a06Libel worsheet a06
Libel worsheet a06
Lucy Taylor
 
A06 10 things we should understand about libal
A06 10 things we should understand about libalA06 10 things we should understand about libal
A06 10 things we should understand about libal
Lucy Taylor
 
Total film page furtinure
Total film   page furtinure Total film   page furtinure
Total film page furtinure
Lucy Taylor
 
Page furtinture lwl
Page furtinture lwlPage furtinture lwl
Page furtinture lwl
Lucy Taylor
 
Difference in priortise
Difference in priortiseDifference in priortise
Difference in priortise
Lucy Taylor
 
Total film flatplans
Total film  flatplansTotal film  flatplans
Total film flatplans
Lucy Taylor
 
Youtube header idea 1 feedback
Youtube header idea 1  feedbackYoutube header idea 1  feedback
Youtube header idea 1 feedback
Lucy Taylor
 

More from Lucy Taylor (20)

Cut the rope
Cut the ropeCut the rope
Cut the rope
 
Red dead redemption marketing mix
Red dead redemption marketing mix Red dead redemption marketing mix
Red dead redemption marketing mix
 
Red run marketing plan
Red run marketing planRed run marketing plan
Red run marketing plan
 
Presentation feedback questionnaire
Presentation feedback questionnairePresentation feedback questionnaire
Presentation feedback questionnaire
 
A03 final ideas
A03  final ideasA03  final ideas
A03 final ideas
 
Youtube header idea 2 feedback
Youtube header idea 2  feedbackYoutube header idea 2  feedback
Youtube header idea 2 feedback
 
Bbfc research task a01
Bbfc research task a01Bbfc research task a01
Bbfc research task a01
 
A01
A01A01
A01
 
Press complaints commission
Press complaints commissionPress complaints commission
Press complaints commission
 
Libel worsheet a06
Libel worsheet a06Libel worsheet a06
Libel worsheet a06
 
A06
A06A06
A06
 
Libel quiz 11
Libel quiz 11Libel quiz 11
Libel quiz 11
 
Librel quiz
Librel quizLibrel quiz
Librel quiz
 
A06 10 things we should understand about libal
A06 10 things we should understand about libalA06 10 things we should understand about libal
A06 10 things we should understand about libal
 
A04
A04A04
A04
 
Total film page furtinure
Total film   page furtinure Total film   page furtinure
Total film page furtinure
 
Page furtinture lwl
Page furtinture lwlPage furtinture lwl
Page furtinture lwl
 
Difference in priortise
Difference in priortiseDifference in priortise
Difference in priortise
 
Total film flatplans
Total film  flatplansTotal film  flatplans
Total film flatplans
 
Youtube header idea 1 feedback
Youtube header idea 1  feedbackYoutube header idea 1  feedback
Youtube header idea 1 feedback
 

Lesson notes 11.03.13

  • 1. Lesson notes - 11.03.13 Twine- In more detail. To set a variable in twine you use ʻsetʼ and you are able to name it as anything as long as you put a ʻ$ʼ before it. Silently tells the computer to use the code given, so without it the code is insufficient. <<silently>> <<set $name = "prompt("What's your name?")>> <<endssilently>> <<print $hello>> - this will allow to get get variables and print they on screen, with this you could set up a loop to help make the game more continuos var gold = 0; (JavaScript) <<set $gold >> (Twine) These two codes set variables but just in different programs, the first in JavaScript and the second in Twine. How to do Conditionals in Twine compared to JavaScript. if(gold ==1){ (JavaScript) buy the sword } else} no sword for you } <<if $gold eq 0>> You have no money, traveller_ (Twine) <<else>> You have a new sword, traveller_ <<endif>>