当前位置: 首页>>代码示例>>Python>>正文


Python MobileTemplate.setRanged方法代码示例

本文整理汇总了Python中services.spawn.MobileTemplate.setRanged方法的典型用法代码示例。如果您正苦于以下问题:Python MobileTemplate.setRanged方法的具体用法?Python MobileTemplate.setRanged怎么用?Python MobileTemplate.setRanged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在services.spawn.MobileTemplate的用法示例。


在下文中一共展示了MobileTemplate.setRanged方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: addTemplate

# 需要导入模块: from services.spawn import MobileTemplate [as 别名]
# 或者: from services.spawn.MobileTemplate import setRanged [as 别名]
def addTemplate(core):
	mobileTemplate = MobileTemplate()
	
	mobileTemplate.setCreatureName('mission_mos_eisley_police_officer')
	mobileTemplate.setLevel(15)
	mobileTemplate.setDifficulty(Difficulty.NORMAL)
	mobileTemplate.setDeathblow(False)
	mobileTemplate.setScale(1)
	mobileTemplate.setSocialGroup("Townsmanship")
	mobileTemplate.setAssistRange(0)
	mobileTemplate.setStalker(True)
	mobileTemplate.setOptionsBitmask(Options.ATTACKABLE)
	
	templates = Vector()
	templates.add('object/mobile/shared_dressed_eisley_officer_aqualish_female_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_aqualish_male_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_human_female_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_human_male_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_quarren_male_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_rodian_female_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_rodian_male_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_trandoshan_female_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_trandoshan_male_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_twilek_female_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_twilek_male_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_zabrak_female_01.iff')
	templates.add('object/mobile/shared_dressed_eisley_officer_zabrak_male_01.iff')
	mobileTemplate.setTemplates(templates)
	#sample on how to set AI file that will make combat decisions
	mobileTemplate.setAIFile('mission_mos_eisley_police_officer')

	#sample on how to set template skills
	skills={}
	skills['of_sh_3']=mobileTemplate.setHeal(0)
	skills['en_spiral_kick_0']=mobileTemplate.setBuff(0)
	skills['of_deadeye_debuff']=mobileTemplate.setRanged(mobileTemplate.setDamage(mobileTemplate.setDebuff(0)))
	
	
	mobileTemplate.setSkills(skills)
	
	#addition via AITemplate - support for both types of weapons
	weaponTemplates = Vector()
	weapontemplate = WeaponTemplate('object/weapon/ranged/pistol/shared_pistol_scout_blaster.iff', WeaponType.PISTOL, 1.0, 35,15,15, 'energy')
	weaponTemplates.add(weapontemplate)
	#set to ranged weapons
	mobileTemplate.setRangedWeaponTemplateVector(weaponTemplates)
	
	#addition via AITemplate - support for both types of weapons
	weaponTemplates = Vector()
	weapontemplate = WeaponTemplate('object/weapon/melee/polearm/shared_polearm_vibro_axe.iff', WeaponType.POLEARMMELEE, 1.0, 7,15,15, 'kinetic')
	weaponTemplates.add(weapontemplate)
	#set to melee weapons
	mobileTemplate.setMeleeWeaponTemplateVector(weaponTemplates)

	#finally set the AI preferred type, this one prefers ranged
	mobileTemplate.setMeleeAI(0)


	attacks = Vector()
	mobileTemplate.setDefaultAttack('rangedShot')
	mobileTemplate.setAttacks(attacks)
	
	core.spawnService.addMobileTemplate('mission_mos_eisley_police_officer', mobileTemplate)
	return
开发者ID:voronius,项目名称:NGECore2,代码行数:66,代码来源:mos_eisley_police_officer.py


注:本文中的services.spawn.MobileTemplate.setRanged方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。