• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Discovering cool things with Encoder

Status
Not open for further replies.
like this
Code:
call inventory.linka(item)         //items

call item.link(1,ItemCatalog.count,item,INV_ITEM)

and this

JASS:
//6 slot inventory
call item1.link(1,ItemCatalog.count,item2,0)        //6 slots
call item2.link(1,ItemCatalog.count,item3,0)        //5 slots
call item3.link(1,ItemCatalog.count,item4,0)        //4 slots
call item4.link(1,ItemCatalog.count,item5,0)        //3 slots
call item5.link(1,ItemCatalog.count,item6,0)        //2 slots
//item6                                             //1 slot

//12 slot inventory
call item12.link(1,ItemCatalog.count,item1,0)       //12 slots
call item12.link(1,ItemCatalog.count,item2,0)       //12 slots

And this
JASS:
local CodeRange level = CodeRange.create(1,20)
local CodeRange xp = CodeRange.create(0, 99)

call hero.linka(level)          //level
call level.link(1,19,xp,0)      //xp

And that's with a little work.

Also, consider this... when you save gold, the max is 1,000,000, but will a level 1 have 1000000 gold ever? Thus you link the level to the resources!!

level 1 - 1000
level 2 - 5000
level 3 - 15000

for example : ). This would mean that you'd want to save the level last-

level
->xp
->gold
->lumber

but Encoder 2.0.2.0 can't do links on the last value at the moment...

anyways, just a lot of fun and interesting thoughts =)

Maybe we should collect a bundle of really cool algorithms and then write a huge advanced tut on them. I've been seeing some new things with Catalog too O-o.
 
Status
Not open for further replies.
Top