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

[Trigger] Sociality of enemies and Traps

Status
Not open for further replies.
Level 4
Joined
Feb 4, 2008
Messages
82
Hello yet again, i ran into some new problems and was wondering how to solve them, didn't find anything in that criterea.

1- I applied some traps to my map, i thought they normally do dmg to anyone setting foot on them while they are activated (i.e. when the cold trap for instance animation is playing and you cross over it, it should cause dmg).

But sadly it didn't so i thought i add a region and make everyone passing over it, would get dmg (and wait 2 sec if he is still in the region he will get dmg yet again.) .

But then when i tested it, it would dmg the passer on the region even if the trap animation isn't showing (i.e. the trap is permitting you to pass) and to my amazment the command even pypassed some spells like the divine aura of the paladin (which should protect him from any dmg anyway).

Can anyone help me in that ? How to make traps do dmg to passers only when they are active and would still do dmg even if someone still stands on them till they move and that won't pypass any spells like divine aura or mana shield?

2- Also another thing i came to discover that every hostile NPC in WC is social to any other kind of hostile NPC or even itself (like if there is a group of wolves in a place scattered around yet they are near each other and a group of spiders, if you attacked one spider or one wolf all the other creatures will come to attack you.)

Is there anything really to over come this, to make the hostile NPCs un social ?

3- I followed the Daelin's tutorial about abilities, i made my ability (FInal Stab which permits the user to teleport behind the target and apply dmg to him) on blink as a dummy ability and used shadow strike as the damage spell for my ability.

I used almost the same triggers he used in the tutorial (except the ones that has alot of if/else because i don't have that lot of effects) but then my character teleports to the target but doesn't do any dmg, any ideas what should i do ?

Thanx in advance
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
1 -
  • Trap Animation
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Animation - Play the stand animation for all doodads of type Trap Fire within Flame Trap 1 <gen>
      • Wait 0.20 seconds
      • Trigger - Turn on Trap Damage <gen> (checking conditions)
      • Wait 1.20 seconds
      • Trigger - Turn off Trap Damage <gen> (checking conditions)
      • Animation - Play the death animation for all doodads of type Trap Fire within Flame Trap 1 <gen>
  • Trap Damage
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Remove all units from TrapDamage
      • Unit Group - Add all units of (Units in Flame Trap 1 <gen>) to TrapDamage
      • If ((TrapDamage is empty) Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Unit Group - Pick every unit in TrapDamage and do (Actions)
        • Loop - Actions
          • Unit - Cause (Picked unit) to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Fire
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
          • Special Effect - Destroy (Last created special effect)
For this question, I made a trigger that would run every two seconds and would play the trap animation which would look like the trap is active and then turn on the trigger that would cause damage. Then it would turn off the trigger after it's done playing its stand animation which would look like if it permitted passing. Flame Trap 1 is a region which contains some of your traps.
  • Unit - Cause (Picked unit) to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Fire
can't be bypassed spells like Divine Shield because it directly deals damage instead of just subtracting life. You could change Damage to a real and set it to any value the trap's damage would be.

2 - Go to Advanced>Gameplay Constants> Combat- Call for Help Range, Creeps and change it to 0. Or, you could make separate players for each creep like Gnolls for Player 12 and make them act neutral to each other through triggers.

3- Could you show your trigger?
 
Level 4
Joined
Feb 4, 2008
Messages
82
  • Final Stab
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Final Stab (Dummy)
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing 0.00 degrees
      • Unit - Add Shadow Strike (Final Stab) to (Last created unit)
      • Unit - Set level of Shadow Strike (Final Stab) for (Last created unit) to (Level of Shadow Strike (Final Stab) for (Triggering unit))
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
That is for the trigger i based the Final Stab (Dummy) on Blink (and changed some of it's fields accordingly) then i based the dmg to be done from the ability called Shadow Strike (Final Stab), the problem is the character doesn't "blink" but it does cast the normal Shadow Strike ability with the modified dmg and the modified mana cost, so what am i missing here?

Also could you be more explanatory on how to make enemies not social ? kinda went over my head, what type of triggers do i need?

Thank you very much for replying..
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
For your second question, you don't need a trigger. All you need to do is go to Advanced>Gameplay Constants> Combat- Call for Help Range, Creeps and change it to 0... Like you could go to File>New Window on internet browsers. (Or File>New>New Window for Internet Explorer)
I don't get your third question though...
 
Level 4
Joined
Feb 4, 2008
Messages
82
Well there are yet more obstacles as it seems,

1- The trigger i made for a Slice and Dice (a custom ability i made) isn't truly working have a look
  • Slice and Dice
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Slice & Dice (Neutral Hostile)
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 50.00 damage of attack type Pierce and damage type Enhanced
      • Wait 1.00 seconds
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 50.00 damage of attack type Pierce and damage type Enhanced
      • Wait 1.00 seconds
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 50.00 damage of attack type Pierce and damage type Enhanced
      • Special Effect - Create a special effect attached to the hand,left of (Triggering unit) using Abilities\Spells\Orc\TrollBerserk\TrollBeserkerTarget.mdl
      • Special Effect - Create a special effect attached to the hand,right of (Triggering unit) using Abilities\Spells\Orc\TrollBerserk\TrollBeserkerTarget.mdl
now as you see in the code it should do dmg the target 3 times, except for some mysterious reason it does only 2 of them and neglect the third and also it does neglect to initiate the 2 special effects (the idea of the spell is based on the WoW rogue spell called Slice and Dice it should animate the caster to slash 3 times - or more as they increase by lvl - and do the dmg for the 3 slashes except i can't figure why it does only 2 of the 3 dmgs) aside from that is there a way to display an animation of a unit slashing (fast) another unit with blood spraying ?

2- In your code about the traps there is something missing that you didn't explain, the part that says "Trigger - Turn on Trap Damage <gen>" to be honest i went over the triggers list to find that command but didn't find it (yes there is a trigger called Trigger - Turn on (This Trigger) but you can't change the "This Trigger" you only can apply a variable...) i don't get how you did that, and i want the traps to do damage to any unit passing on it while active not to destroy it ...

3- last thing the game constants that you told me to change does that apply for the whole Hostile NPCs i placed in my map ? because i didn't find any specific options (like i want only wolves that are placed in the lvl 1 area to act un social but the wolves in the rest of the map to behave normally and are social) how can i do that?

I know i am asking too much but at this point i can't figure it out by myself i really appreciate your help :) and thank you very much for replying :D
 
Last edited:
Level 4
Joined
Feb 4, 2008
Messages
82
Alright i managed to fix the glitch in that spell i made (alone - YEY) .

I tried to change the sociality of enemies (to make it specific for certain units) but couldn't and the thing you said with game constants that will change the range for all units inside the game not specific ones.

Only thing now i can't figure out is how can i add dmg to traps like (Frost Trap) and not to destroy enemies only to damage them while they play their animation only?

Closest thing i got is this
  • Trap Labrinyth
    • Events
      • Unit - A unit enters Labrinyth DMG <gen>
    • Conditions
    • Actions
      • Wait 1.50 seconds
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 35.00 damage of attack type Spells and damage type Normal
      • Wait 3.50 seconds
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 35.00 damage of attack type Spells and damage type Normal
      • Wait 3.50 seconds
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 35.00 damage of attack type Spells and damage type Normal
      • Wait 3.50 seconds
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 35.00 damage of attack type Spells and damage type Normal
      • Wait 3.50 seconds
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 35.00 damage of attack type Spells and damage type Normal
but as you can see the timing doesn't match the animation timing in game ...

So anyone mind telling me what should i do ?
 
Status
Not open for further replies.
Top