Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I found today that the linger() and chance(number) functions stopped working. No matter how long i use wait/look, that which has worked few days ago now does nothing. Could you please check? I restarted adventuron completly to be sure but it is so. Last time i changed my code it was on version 25 or 26.

Hello,

I don't see a problem with linger() or chance(n), testing on most recent version (27b).

I tested using this code:

start_at    = my_location
start_theme = two
locations {
   my_location   : location "Location One" ;
   my_location_2 : location "Location Two" ;
}
connections {
   from, direction, to = [
      my_location, east, my_location_2, 
   ]
}
on_command {
   : match "test _"  {
     : print {( "On command linger : " + linger() )}
     : print {( "On command chance : " + chance(50) )}
   }
}
on_tick {
   : print {( "On tick linger : " + linger() )}
   : print {( "On tick chance : " + chance(50) )}
}
on_describe {
   : print "Type TEST to test linger in the on_command{{}} block." ;
   : print {( "On describe linger : " + linger() )}
   : print {( "On describe chance : " + chance(50) )}
}


Linger() should reset to zero when you move to a new location and increment on each turn you are in the location. chance(n) should return true n percent of the time. Both functions appear to be working as designed.

If you have a scenario that is not working, please can you supply it, and I will test, and fix if necessary.