• 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.

[JASS] Lost in Jass

Status
Not open for further replies.
Level 8
Joined
Dec 9, 2009
Messages
397
So, I've started to implement ZTS Threat System and I've got some questions about the script to activate it for specific units.

He's got this in a unit group loop
  • Custom script: call ZTS_AddThreatUnit( GetEnumUnit(), false )
So, is GetEnumUnit() talking about Picked Unit?

How would I have it work with a unit that is respawning (Last Created Unit)

I tried doing a bit of research at some Jass sites to figure that much out, but wasn't getting anywhere.

I'd like to create a Multiboard showing creep name, and threat % of all the creeps currently in combat with someone, What are the variables called?

This system didn't add the variables like in the DDS system I added, so I'm sure what is what.

And if it's possible I'd like for people with a certain ability to get a different multiboard that shows creep name threat % of player, and then % of 2nd place, 3rd place (player color showing who % belongs to for 2nd and 3rd)

Does this system save who is in 2nd/3rd? or have anything that can make figuring it easier?
 
Level 8
Joined
Dec 9, 2009
Messages
397
Thanks, but I can't seem to get it to work with
  • Custom script: call ZTS_AddThreatUnit( GetEnumUnit(), false )
I did that in the same loop as my assigning of custom value to each unit, but my neutral hostile guys are not returning in the distance I told them to :/
 
Level 8
Joined
Dec 9, 2009
Messages
397
System still isn't working. I reDL'd the map, and replaced it in my map, still the units are not returning.

and yes, it's in a loop while it's going through picking units.
 
Last edited:
Level 8
Joined
Dec 9, 2009
Messages
397
My code, is the ZTS code, and
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set SpookTime = 30.00
      • Set WinningPlayer[1] = Neutral Hostile
      • Set HeroRNum = 1
      • Set LootTime = 20.00
      • Set HeroRespawnTime = 40.00
      • Set PlayerGroup = (All players controlled by a User player)
      • Game - Set the time of day to 12.00
      • Set Left = -50.00
      • Set Trans = 0.00
      • Visibility - Disable black mask
      • Player - Disable sleeping for all creeps
      • Set DungeonMobs[1] = (Units in Dung1 <gen> owned by Neutral Hostile)
      • Set DungeonMobs[2] = (Units in Dung2 <gen> owned by Neutral Hostile)
      • Set DungeonMobs[3] = (Units in Dung3 <gen> owned by Neutral Hostile)
      • Set PlayerColors[1] = |c00FF0303
      • Set PlayerColors[2] = |c000042FF
      • Set PlayerColors[3] = |c001CE6B9
      • Set PlayerColors[4] = |c00540081
      • Set PlayerColors[5] = |c00FFFC01
      • Set PlayerColors[6] = |c00fEBA0E
      • Set PlayerColors[7] = |c0020C000
      • Set PlayerColors[8] = |c00E55BB0
      • Set PlayerColors[9] = |c00959697
      • Set PlayerColors[10] = |c007EBFF1
      • Set PlayerColors[11] = |c00106246
      • Set PlayerColors[12] = |c004E2A04
      • Set CreepValue = 20
      • Player Group - Pick every player in PlayerGroup and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Playable map area)
          • Hero - Reserve 1 Hero buttons for the local player
          • Set Faction[(Player number of (Picked player))] = 120
          • Player - Make Player 11 (Dark Green) treat (Picked player) as an Ally
          • Player - Make (Picked player) treat Player 11 (Dark Green) as an Ally
          • Player - Make (Picked player) treat Neutral Passive as an Neutral
          • Player - Disable Hero Glow SB for (Picked player)
          • Player - Disable Blink Book for (Picked player)
          • Player - Disable Holy Favor Book for (Picked player)
          • Set GreenAlly[(Player number of (Picked player))] = 0
          • Unit - Create 1 Soul (Picker) for (Picked player) at (Center of DPS <gen>) facing Default building facing (270.0) degrees
          • Unit - Create 1 Soul (Picker) for (Picked player) at (Center of Heals <gen>) facing Default building facing (270.0) degrees
          • Unit - Create 1 Soul (Picker) for (Picked player) at (Center of Tank <gen>) facing Default building facing (270.0) degrees
          • Unit - Create 1 Soul (Picker) for (Picked player) at (Center of Caster <gen>) facing Default building facing (270.0) degrees
          • Unit - Create 1 Food for (Picked player) at (Center of CenterofHeros <gen>) facing Default building facing (270.0) degrees
          • Camera - Lock camera target for (Picked player) to Soul (Picker) 0000 <gen>, offset by (0.00, 0.00) using The unit's rotation
          • Camera - Set (Picked player)'s camera Angle of attack to 360.00 over 0.00 seconds
          • Camera - Set (Picked player)'s camera Distance to target to 700.00 over 0.00 seconds
          • Camera - Set (Picked player)'s camera Rotation to 135.00 over 0.00 seconds
          • Set Lookingatcam[(Player number of (Picked player))] = 1
          • Set Picking[(Player number of (Picked player))] = True
          • Set CritChance[(Player number of (Picked player))] = 10
          • Set ParryChance[(Player number of (Picked player))] = 10
          • Set CritBonus[(Player number of (Picked player))] = 1.30
      • Game - Display to PlayerGroup for 9999.00 seconds the text: ...
      • Set AllNeutralHos = (Units in (Entire map))
      • Unit Group - Pick every unit in AllNeutralHos and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Multiple ConditionsOr - Any (Conditions) are true
                • Conditions
                  • (Owner of (Picked unit)) Equal to (==) Neutral Hostile
                  • (Owner of (Picked unit)) Equal to (==) Neutral Passive
                  • (Owner of (Picked unit)) Equal to (==) Player 12 (Brown)
                  • (Owner of (Picked unit)) Equal to (==) Player 11 (Dark Green)
            • Then - Actions
              • Set CreepValue = (CreepValue + 1)
              • Unit - Set the custom value of (Picked unit) to CreepValue
              • Set Creep_Loc[CreepValue] = (Position of (Picked unit))
              • Set Creep_Angle[CreepValue] = (Facing of (Picked unit))
              • Set CritBonus[CreepValue] = 1.30
              • Custom script: call ZTS_AddThreatUnit( GetEnumUnit(), false )
            • Else - Actions
      • Custom script: call DestroyGroup(udg_AllNeutralHos)
      • Custom script: call DestroyForce(udg_PlayerGroup)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
 
Level 8
Joined
Dec 9, 2009
Messages
397
Still not working, and yes it is going through that loop or my respawn system wouldn't work. (also added game text after the ZTS call)
 
Level 8
Joined
Dec 9, 2009
Messages
397
Still can't figure out why ZTS isn't working on my map.

Tried what I could.

Sent map to mckill but he can't open without UMSWE enabled and he doesn't want to enable it for some reason.
(even though you could just turn it off after)
 
Level 8
Joined
Dec 9, 2009
Messages
397
Still unable to get it to work.

Copied it over, used the custom script to add computer units to the system in init trigger
The units will still not return after being dragged away from camp.
 
Status
Not open for further replies.
Top