Visible, untargetable unit? menu

User Tag List

Results 1 to 4 of 4
  1. #1
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Visible, untargetable unit?

    What can I do to a unit to make it visible, but not able to be targeted by players, pets, or NPCS? ie: Anti-Magic Feild, Flame Orb, Fires on the ground, etc. I'm running on Arcemu 3.3.5.

    Visible, untargetable unit?
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    UNIT_FLAG_NOT_SELECTABLE = 0x02000000

    Hexadecimal -> Denary.

    Target creature -> .mod flag 33554432

    Apply flags 2 as well to make it unattackable and won't attack players.

    .mod flag 2

    With not selectable:

    .mod flag 33554434
    Last edited by stoneharry; 10-18-2011 at 01:02 PM.

  3. #3
    choweyiii's Avatar Contributor
    Reputation
    91
    Join Date
    Aug 2010
    Posts
    127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about if I want a visible, un-attackable, but can attack unit? Like Flame Orb behaves. I really appreciate the help, stoneharry.

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by choweyiii View Post
    How about if I want a visible, un-attackable, but can attack unit? Like Flame Orb behaves. I really appreciate the help, stoneharry.
    Not sure if there is a specific flag for that (I don't think there is).

    However, if you're scripting that creature (as you should be for that sort of unit) then you can tell it to attack the player even though it has flags 2 applied.

    If that doesn't work, directly casting spells that deal damage or using the Strike(args) method works.

    For my 'beams of light' which people must avoid, I used a displayid for effects and made it have untargetable flags, but set to faction 35 so that it won't engage in combat. When the player draws within 7 yards of it, I use Strike to deal damage and then knock them back with a spell I have the player cast on himself. It works.

    Spawn creature, set untargetable:
    Code:
    		local plr = pUnit:GetRandomPlayer(0)
    		if plr ~= nil then
    			INS[id].VAR.BeamA = pUnit:SpawnCreature(203123, plr:GetX(), plr:GetY(), plr:GetZ(), 0, 35, 0)
    		end
    		plr = pUnit:GetRandomPlayer(0)
    		if plr ~= nil then
    			INS[id].VAR.BeamB = pUnit:SpawnCreature(203123, plr:GetX(), plr:GetY(), plr:GetZ(), 0, 35, 0)
    		end
    		INS[id].VAR.BeamA:SetUnitToFollow(INS[id].VAR.BeamA:GetClosestPlayer(), 0.2, 1) 
    		INS[id].VAR.BeamB:SetUnitToFollow(INS[id].VAR.BeamB:GetClosestPlayer(), 0.2, 1)
    		INS[id].VAR.BeamA:SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
    		INS[id].VAR.BeamB:SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)
    Strike when near:
    Code:
    	local plr = INS[id].VAR.BeamA:GetClosestPlayer()
    	if plr ~= nil then
    		if plr:GetDistanceYards(INS[id].VAR.BeamA) < 7 then
    			plr:CastSpell(43418) -- impact
    			INS[id].VAR.BeamA:Strike(plr, 0, 38043, 520, 530, 2) -- strike plr, display spell 38043 in combat log, deal 520-530 damage, deal x2 damage on critical strike.
    		end
    	end

Similar Threads

  1. How to make boots visible?
    By folgore in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 06-05-2007, 06:42 PM
  2. england claims united states!
    By CCX5 in forum Community Chat
    Replies: 15
    Last Post: 05-18-2007, 04:23 PM
  3. Troll to undead - no shoes visible
    By niebezimienny in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 03-18-2007, 02:55 PM
  4. fellow hackers unite!!!
    By Archelf in forum World of Warcraft General
    Replies: 2
    Last Post: 02-23-2007, 07:47 AM
  5. Need a mod that hides Standard blizz Unit Frames
    By Sikonosos in forum World of Warcraft General
    Replies: 1
    Last Post: 01-26-2007, 07:27 PM
All times are GMT -5. The time now is 03:58 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search