User Tools

Site Tools


lua:scripting:examples:sharinginfo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
lua:scripting:examples:sharinginfo [2015/09/28 04:22] vodurlua:scripting:examples:sharinginfo [2015/09/28 04:22] (current) vodur
Line 1: Line 1:
-Note that as of today (9/27/2015), while this example is a valid example of savetbl/loadtbl, use of newly added 'shared' table will be more appropriate for many applications that required savetbl/loadtbl previously.+ 
 + 
 +**Note that as of today (9/27/2015), while this example is a valid example of savetbl/loadtbl, use of newly added 'shared' table will be more appropriate for many applications that required savetbl/loadtbl previously.**
  
 We know how to make 1 mob remember a player by saving their name in a variable or table, but what if we wanted that information available to other mobs or even objects and area scripts? For this we can use '[[:lua:savetbl|savetbl]]' and '[[:lua:savetbl|loadtbl]]'. We know how to make 1 mob remember a player by saving their name in a variable or table, but what if we wanted that information available to other mobs or even objects and area scripts? For this we can use '[[:lua:savetbl|savetbl]]' and '[[:lua:savetbl|loadtbl]]'.
Line 155: Line 157:
  
 Final notes: savetbl and loadtbl will always save/load in area specific directory (angel's heaven dir in this case) according to HOME area, not current area. It's the same directory whether called from mob, object, or area so it means you can share info between any type of prog, but only in the same area. Final notes: savetbl and loadtbl will always save/load in area specific directory (angel's heaven dir in this case) according to HOME area, not current area. It's the same directory whether called from mob, object, or area so it means you can share info between any type of prog, but only in the same area.
 +
  
lua/scripting/examples/sharinginfo.1443414161.txt.gz · Last modified: 2015/09/28 04:22 by vodur