• 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] 3 Questions (+rep to who answer)

Status
Not open for further replies.
Level 9
Joined
Jul 24, 2007
Messages
308
Hello, i have three questions that i couldnt solve (or i think i couldnt):

1- How can i make a spell that is a self-evasion, you know, the attacker has the abilitys to miss an attack, not the targeted unit has the ability to dodge.

how can i make that ability? (it means when ever you attack you have X% chance to miss (not to dodge))

2- i am having a problem with variable units and an event:
  • Unit - Create X at blah blah..
  • Set FREK! = last created unit
  • Event - unit becomes within range of 250 of FREK
  • Actions - blah blah
the problem, i cant refer to FREK in the event in the second trigger! how can i do that?


3- how can i see computer difficulity that is chosen by the host via triggers, like Insane or Normal or Easy..? (what should i do to know that)
 
Level 10
Joined
Sep 6, 2007
Messages
440
Curse spell of banshee. Just make a group and make it pick every unit and make a dummy so it will curse them ( if the skill is active ). However, if it's passive you can mess with items' abilities. That's one..
2-) Don't use "!" with the variable...
3-) Mess with Forces...
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
1- How can i make a spell that is a self-evasion, you know, the attacker has the abilitys to miss an attack, not the targeted unit has the ability to dodge.
-->JASS, damage detection event.

2- i am having a problem with variable units and an event:
-->JASS, dynamical triggers.

3- how can i see computer difficulity that is chosen by the host via triggers, like Insane or Normal or Easy..? (what should i do to know that)

JASS:
native GetAIDifficulty takes player num returns aidifficulty

The third might be possible in GUI, but anyways...

JASS vs You - 3:0
[RAINBOW]Pwned![/RAINBOW] All your base is belong to JASS.
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
The first problem is not solved yet, I believe. Simply because curse can be dispelled and be stolen by spell steal, and I don't know if it will work if your unit is invulnerable, am I wrong?


I'll write an example dynamical trigger.
Here it is:


JASS:
//You create the dynamical trigger somewhere you want:
set udg_DamDetectTrig = CreateTrigger()
call TriggerAddAction(udg_DamDetectTrig, function DamDetectTrig_Actions)

//The Dynamical trigger's actions:
function DamDetectTrig_Actions takes nothing returns nothing
endfunction
//----
//You Register FREK to the event:
call TriggerRegisterUnitEvent(udg_DamDetectTrig, udg_FREK, EVENT_UNIT_DAMAGED)
//----

Some attachment map:
http://www.hiveworkshop.com/resources_new/pastebin/show/b492ae9a950b834006fd83cf2551734e/
 
Level 10
Joined
Oct 2, 2005
Messages
398
I have a solution to your first problem, that cannot be dispelled or stolen.

  • Some Trigger
    • Events
      • Unit is Attacked
    • Conditions
      • 1 Equal to 1 (duh)
    • Actions
      • Unit - Add (Evasion) to (Triggering Unit)
      • Wait 0.10 seconds
      • Unit - Remove (Evasion) from (Triggering Unit)
And that's all!(dont forget my little rep xD)
 
Last edited by a moderator:
Status
Not open for further replies.
Top