Page 1 of 1

counting secret script help pls

Posted: Fri Sep 06, 2013 3:05 pm
by Drakkan
Hi,
I have seen this somewhere in the dungeon - when finished to count how many secrets player has discovered (like 15/ 20). Is there some script which checks how many secret has been discovered and how to work with that ? Thanks

Re: counting secret script help pls

Posted: Fri Sep 06, 2013 3:14 pm
by msyblade
I do not know the answer to this, but here's my guess. It is likely as simple as counting how many "secret" entities are placed, compared to how many were "triggered".

Re: counting secret script help pls

Posted: Fri Sep 06, 2013 8:30 pm
by Komag
in the reference:
getStatistic(stat)
Returns the value of a built-in statistic. Possible statistics are: “play_time”, “monsters_killed”, “items_found”, “secrets_found”, “treasures_found”, “toorum_notes_found”, “skulls_found”, “grimrock_doors_opened”, “tiles_moved”, “pit_falls”, “melee_attacks”, “ranged_attacks”, “unarmed_attacks”, “rocks_thrown”, “spells_cast” and “potions_mixed”.
So maybe you could run that right before the end