找回密码
 点一下
查看: 2581|回复: 4

unitpool,itempool如何用,哪位兄弟指教? (已解决)

[复制链接]
发表于 2006-4-16 00:54:13 | 显示全部楼层 |阅读模式
unitpool,itempool如何用,哪位兄弟指教?

[ 本帖最后由 zyl910 于 2006-4-24 01:02 编辑 ]
发表于 2006-4-16 01:03:09 | 显示全部楼层
貌似用于创建随机单位、随机物品

common.j
[jass]
//====================================================================
// Randomization API
native GetRandomInt takes integer lowBound, integer highBound returns integer
native GetRandomReal takes real lowBound, real highBound returns real

native CreateUnitPool           takes nothing returns unitpool
native DestroyUnitPool          takes unitpool whichPool returns nothing
native UnitPoolAddUnitType      takes unitpool whichPool, integer unitId, real weight returns nothing
native UnitPoolRemoveUnitType   takes unitpool whichPool, integer unitId returns nothing
native PlaceRandomUnit          takes unitpool whichPool, player forWhichPlayer, real x, real y, real facing returns unit

native CreateItemPool           takes nothing returns itempool
native DestroyItemPool          takes itempool whichItemPool returns nothing
native ItemPoolAddItemType      takes itempool whichItemPool, integer itemId, real weight returns nothing
native ItemPoolRemoveItemType   takes itempool whichItemPool, integer itemId returns nothing
native PlaceRandomItem          takes itempool whichItemPool, real x, real y returns item

// Choose any random unit/item. (NP means Neutral Passive)
native ChooseRandomCreep        takes integer level returns integer
native ChooseRandomNPBuilding   takes nothing returns integer
native ChooseRandomItem         takes integer level returns integer
native ChooseRandomItemEx       takes itemtype whichType, integer level returns integer
native SetRandomSeed            takes integer seed returns nothing

[/jass]
回复

使用道具 举报

发表于 2006-4-16 10:58:20 | 显示全部楼层
我是这版的挂名版主,zyl910 才是名副其实的JASS区版主。

有关问题很奇怪,为什么我一来这就让我当JASS区版主??

其实我最适合当水区版主了,有娱乐性啊。
回复

使用道具 举报

发表于 2006-4-16 11:43:20 | 显示全部楼层

GW大大您的《Jass完全手册》足以证明一切
回复

使用道具 举报

发表于 2006-4-18 08:56:10 | 显示全部楼层
洪教主仙福永享 寿与天齐!!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-5-2 13:16 , Processed in 0.077953 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表