About: Event Scripting Common Tasks   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

You may use the turn callback and react to a particular turn / year number for a unique event function begin_ancient_era() -- Event that happens at 2000 BC here end function turn_cb(turn, year) if year == -2000 then begin_ancient_era() end end signal.connect('turn_started', 'turn_cb') You can save a flag if an event was already performed

AttributesValues
rdfs:label
  • Event Scripting Common Tasks
rdfs:comment
  • You may use the turn callback and react to a particular turn / year number for a unique event function begin_ancient_era() -- Event that happens at 2000 BC here end function turn_cb(turn, year) if year == -2000 then begin_ancient_era() end end signal.connect('turn_started', 'turn_cb') You can save a flag if an event was already performed
dcterms:subject
abstract
  • You may use the turn callback and react to a particular turn / year number for a unique event function begin_ancient_era() -- Event that happens at 2000 BC here end function turn_cb(turn, year) if year == -2000 then begin_ancient_era() end end signal.connect('turn_started', 'turn_cb') You can save a flag if an event was already performed function city_was_lost(city, loser, winner) if winner:is_human() and not did_win_first_city then -- remember that we did this did_win_first_city = true -- now handle the event notify.player(winner, "Congratulations, you have taken your first city") end end signal.connect('city_lost', 'city_was_lost') -- NOTE: We don't use the 'local' word in front of the did_win_first_city variable, because this variable -- is a global variable (will be saved in the savegame)
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software