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

About Neutral Creeps

Status
Not open for further replies.
Level 5
Joined
Jul 30, 2012
Messages
93
Hi, i have question about neutral creeps trigger.

I wanna do if hero killed by nc, game-text write something
Then if hero killed by other hero, game-text write another something
Triggers:

clkdg.png


Works both of them. :S Where am i wrong???
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Learn to post triggers in trigger tags [ TRIGGER][/TRIGGER] or at least hidden tags [ hidden=][/hidden] for images. Whrong section of the forum. Enought about you :)

Too much calls the trigger should look like this.
  • Kill
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set DIEING = (Triggering unit)
      • Set KILLER = (Killing unit)
      • Set PLAYER_DIEING = (Owner of DIEING)
      • Set PLAYER_KILLER = (Owner of KILLER)
      • Set PLAYER_NUMBER_DIEING = (Player number of PLAYER_DIEING)
      • Set PLAYER_NUMBER_KILLER = (Player number of PLAYER_KILLER)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DIEING is A Hero) Equal to True
          • PLAYER_KILLER Equal to Neutral Hostile
        • Then - Actions
          • Game - Display to (All players) the text: (Your text + ((Name of PLAYER_DIEING) + the rest of your text))
          • Set DEATHS[PLAYER_NUMBER_DIEING] = (DEATHS[PLAYER_NUMBER_DIEING] + 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DIEING is A Hero) Equal to True
              • PLAYER_KILLER Not equal to Neutral Hostile
            • Then - Actions
              • Game - Display to (All players) the text: ((Name of PLAYER_KILLER) + ( + ((Name of PLAYER_DIEING) + your text)))
              • Set DEATHS[PLAYER_NUMBER_DIEING] = (DEATHS[PLAYER_NUMBER_DIEING] + 1)
              • Set KILLS[PLAYER_NUMBER_KILLER] = (KILLS[PLAYER_NUMBER_KILLER] + 1)
            • Else - Actions
              • If (PLAYER_DIEING Equal to Neutral Hostile) then do (Set CREEP_KILLS[PLAYER_NUMBER_KILLER] = (CREEP_KILLS[PLAYER_NUMBER_KILLER] + 1)) else do (Do nothing)
All of the variable used here are temporary variables except DEATHS, KILLS and CREEP_KILLS


Why you post if you say it works ?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Then you don't want the creep kills ?

  • Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set DIEING = (Triggering unit)
      • Set KILLER = (Killing unit)
      • Set PLAYER_DIEING = (Owner of DIEING)
      • Set PLAYER_KILLER = (Owner of KILLER)
      • Set PLAYER_NUMBER_DIEING = (Player number of PLAYER_DIEING)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PLAYER_KILLER Equal to Neutral Hostile
        • Then - Actions
          • Game - Display to (All players) the text: (Your text + ((Name of PLAYER_DIEING) + the rest of your text))
          • Set DEATHS[PLAYER_NUMBER_DIEING] = (DEATHS[PLAYER_NUMBER_DIEING] + 1)
        • Else - Actions
          • Set PLAYER_NUMBER_KILLER = (Player number of PLAYER_KILLER)
          • Game - Display to (All players) the text: ((Name of PLAYER_KILLER) + ( + ((Name of PLAYER_DIEING) + your text)))
          • Set DEATHS[PLAYER_NUMBER_DIEING] = (DEATHS[PLAYER_NUMBER_DIEING] + 1)
          • Set KILLS[PLAYER_NUMBER_KILLER] = (KILLS[PLAYER_NUMBER_KILLER] + 1)
 
Level 5
Joined
Jul 30, 2012
Messages
93
I want only this:

If a hero killed by player 11 or player 12, write game-text [heroname] killed by player 11/12's creep.
If a hero killed by neutral creeps, write game-text: [hero name] killed by neutral creeps.
But if hero killed by another hero, write game-text [hero name] killed by [hero name2]

I did them but works both of. :S

This's my map.You can do and upload. :3
Thank you!
 

Attachments

  • Akissel[Beta]~4.w3x
    639.5 KB · Views: 43
Level 12
Joined
Mar 24, 2011
Messages
1,082
Should work now. Will leave the testing to you :)
Note: Neutrall hostile = Player 13

Some tips, you might want to fix those:
- Your triggers spam leaks. If you don't know how and why check this
- Your triggers spam calls. If you don't know how and why check this
- You have like 10+ map initialization triggers. Better merge them.
 

Attachments

  • Akissel[Beta]~4 Editted.w3x
    640 KB · Views: 37
Level 5
Joined
Jul 30, 2012
Messages
93
Omg. o.o I tried that but still works both of them. :(

I killed by neutral creeps and wroten "[heroname] killed by neutral creeps +[heroname] killed by nussel(player 12*)

Then i killed by nussel (player 12) and wroten "[heroname] killed by neutral creeps +[heroname] killed by nussel(player 12*)


I don't know did i explain. :S I want just writes 1 text... Tyvm :3
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
The seccond message (the one with the nussel) is from ANOTHER trigger
Just delete it and it will dissapear.
  • Creep Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to False
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) belongs to an ally of Player 11 (Dark Green)) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: (Nussel + ((Name of (Owner of (Triggering unit))) + öldürdü!))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) belongs to an ally of Player 12 (Brown)) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: (Akislia + ((Name of (Owner of (Triggering unit))) + öldürdü!))
        • Else - Actions
 
Level 5
Joined
Jul 30, 2012
Messages
93
It's okey i deleted.But i have a problem about this.This time "always" wroten killed by neutral creeps..I killed by nussel(player 12), nc or a player's hero, it doesn't matter.Always writes killed by neutral creeps:Any different idea?
 
Status
Not open for further replies.
Top