Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Instantaneous Unit Invisible

Discussion in 'World Editor Help Zone' started by Arhowk, May 18, 2014.

  1. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0
    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)
     
  2. Solu9

    Solu9

    Joined:
    Jan 25, 2011
    Messages:
    2,166
    Resources:
    47
    Models:
    26
    Icons:
    16
    Skins:
    1
    Tools:
    1
    Maps:
    3
    Resources:
    47
    I believe you have to set the duration of the spell to 0.
     
  3. That's normal for permanent invisibility. Cause the invisibility via triggers.
     
  4. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    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 ?
     
  5. Ceday

    Ceday

    Joined:
    Feb 22, 2010
    Messages:
    1,114
    Resources:
    0
    Resources:
    0
    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.