Difference between revisions of "Talk:GetCombatTarget"
Jump to navigation
Jump to search
Quick answer, but rest will need to be at forums
imported>Shademe (→How : Finding the player's Combat Targets ?: I thought of it first) |
imported>Haama (Quick answer, but rest will need to be at forums) |
||
Line 8: | Line 8: | ||
::That was my first thought as well :o but walking through nearby references requires OBSE or a rather long spell of scripts to work - Both of which I'm trying to avoid. -- [[User:Shademe|shademe]] 01:17, 5 October 2008 (EDT) | ::That was my first thought as well :o but walking through nearby references requires OBSE or a rather long spell of scripts to work - Both of which I'm trying to avoid. -- [[User:Shademe|shademe]] 01:17, 5 October 2008 (EDT) | ||
:::The spell AoE isn't too bad and has worked for many. If you want to use a centralized script, have the spell pass the NPC's reference to an [[Activate|activator]] [[Activation_Functions|function]] | |||
begin ScriptEffectStart | |||
if (GetCombatTarget == player) | |||
set ActRef.rNPC to GetSelf | |||
ActRef.Activate player, 1 | |||
endif | |||
end | |||
:::The only downside - each NPC can't have its own set of variables, but most of the time their not necessary. I would suggest taking this discussion to the [http://www.bethsoft.com/bgsforums/index.php?showforum=24 forums] for more answers. | |||
:::--[[User:Haama|Haama]] 10:34, 5 October 2008 (EDT) |