
12-09-2007, 11:31 PM
|
|
Incubator
|
 |
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
|
|
Quote:
Originally Posted by Novo
But Powerful for those who know how to use it. Additionally, the merger comes with a default way of merging. It isn't necessary to define your own function, but the power is there if you do!
PHP Code:
function onCreated()
{
mod1 = TMap.newInstance({{"a",3}, {"b", 1}} );
mod2 = TMap.newInstance({{"a",2}, {"b", 1}, {"c", 1}} );
mod3 = TMap.merge( mod1, mod2 );
echo( mod3.toArray() ); // "a,5","b,2","c,1"
}
Simple for those who don't need more.
|
Can you tell me an instance where it would be used in-game? |
|
|
|