• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Instantaneous Unit Invisible

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
I'm trying to create a spell which creates five invisible units near the hero at random spots. The problem is when they're spawned, they stay visible to everyone else for a second or so. Is there a way to make it so that the model is never shown, selection isn't selectable, etc. instantly on spawn?

(I'm using the ability Permanent Invisibility)
 

Deleted member 219079

D

Deleted member 219079

That's normal for permanent invisibility. Cause the invisibility via triggers.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Is there a way to make it so that the model is never shown, selection isn't selectable, etc. instantly on spawn?
Does these requirements apply to all players ?

Seems like Locust is the solution to make the unit unselectable (by all players).
As for the "model never shown", you can use this script;
  • Spawn Unit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Set PlayerOwner = (Triggering player)
      • Set SpawnedUnitType = No unit-type
      • Set TempLoc = (Position of (Triggering unit))
      • Custom script: if GetLocalPlayer() == udg_PlayerOwner then
      • Set SpawnedUnitType = Peasant
      • Custom script: endif
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set TempLoc2 = (TempLoc offset by (Random real number between 100.00 and 400.00) towards (Random angle) degrees)
          • Unit - Create 1 SpawnedUnitType for PlayerOwner at TempLoc2 facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_TempLoc2)
      • Custom script: call RemoveLocation(udg_TempLoc)
This will cause the unit to only "appear" to the owner of that unit, don't worry, it won't cause desync.

Although I was thinking to go for a different approach, please tell me what are you going to do with those spawned units ?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Use permanent invis with 0 duration, if not works use a dummy unit(with 0 casting animation time) to cast sorceress invisibility to spawned unit, if you don't want to use second option add ghost(invisible) to spawned units from either object editor or triggers.
 
Status
Not open for further replies.
Top