Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

max.ray

how to add "daemon_killer = true" to EMP

Recommended Posts

max.ray    0
Quote

\invisible inc moded\scripts\sim\abilities\prime_emp


is this place right to add ?

daemon_killer = true,

thanks a lot  for reading :D

Share this post


Link to post
Share on other sites
max.ray    0

i tired this but not working :(

via @invisible inc moded\sim\unitdefs

	item_emp_pack = util.extend(commondefs.item_template)
	{
		type = "simemppack",
		name = STRINGS.ITEMS.EMP_1,
		desc = STRINGS.ITEMS.EMP_1_TOOLTIP,
		flavor = STRINGS.ITEMS.EMP_1_FLAVOR,
		icon = "itemrigs/FloorProp_emp.png",
		--profile_icon = "gui/items/icon-emp.png",
		profile_icon = "gui/icons/item_icons/items_icon_small/icon-item_emp_small.png",
		profile_icon_100 = "gui/icons/item_icons/icon-item_emp.png",	
		abilities = { "carryable","recharge","prime_emp", },
		requirements = { hacking = 2 },
		traits = { cooldown = 0, cooldownMax = 8, range = 3, emp_duration = 2,daemon_killer = true , },
		value = 500,
		floorWeight = 1,
		notSoldAfter = 48, 
	},

 

Share this post


Link to post
Share on other sites
SteelCrow    2

Actually, if you want to make an EMP that kills daemons, you'll need to change or copy/paste/edit the actual detonation "function simunit:processEMP" found in sim\simunit.lua

There's a cascade of abilities for EMP such that the agent uses the item, item spawns a unit, unit triggers itself "TRG_END_TURN" and finds targets, and targets are then dealt the function "processEMP".  It's one of the more complicated items in the game.  I recommend creating new abilities and functions for the whole set to minimize conflicts.

As for the actual killing of Daemons, the lines from Hunter are what you need.  I used them to create a Buster Chip style daemon-killer.

Share this post


Link to post
Share on other sites