• 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] Freeze and share help :(

Status
Not open for further replies.
Level 3
Joined
Apr 13, 2009
Messages
26
1.Can someone show me how to make a freeze ability like in DotA where you can freeze the heroes from the circle that are left.
2.I need to know how players that left automaticly give share to the teammates just like DotA :)

10x ( I will give credit )
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

  • Freez
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to <Your Ability>
    • Actions
      • Unit - Pause (Target unit of ability being cast)
  • Share when leaving
    • Events
      • Player - Player 1 (Red) leaves the game
    • Conditions
    • Actions
      • Game - Grant shared vision and full shared unit control of Player 1 (Red) units with his/her allies
1) For the freezing use an ability like "Stormbolt" with range 50 and allowed to target allys.

2) For the leaving Trigger do it with every Player.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I'm not a "OMG, DotA is t3h r0ckz0r" kind of guy (in fact, I think DotA is boring), so erm...
Is the freeze-ability an AoE ability, or a target ability (in the last case, Dr. Boom has given you the right trigger :p)

Don't try to copy everything from DotA, though: keep in mind that original games are almost always better than copies.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Already solved.

And DotA doesnt suck. Its played over the world and on leagues on competitive playing level.

Sorry, did I say it sucked? :O
You're twisting my words and going off-topic...
(That it's played all over the world and in leageus, etc... doesn't mean anything: I don't like soccer either, yet some people kill eachother if their team loses - it's just popular)
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
DotA can be boring yes, but that's off the point really. For an AoE freeze you'll need a JASS function. I'll try it out and give you the results. Also, for the share trigger you'll have to add the action to give other player the gold, again I'll see and tell you. Good luck with this.
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Here it is. I'll give you a test map (too much writing :p). Remember to do this for all players accordingly.

EDIT:Add a Trigger - Turn off this trigger at the start of this, as first action. Helps with memory leaks.

EDIT:Here's the JASS code for the freeze spell. Create a trigger named Freeze (IMPORTANT) then go to Edit>Convert to Custom Text and paste this.
JASS:
function freeze takes nothing returns nothing
local group to_freeze = CreateGroup()
local group frozen = CreateGroup()
local location skill_position = GetSpellTargetLoc()
local unit freeze
call GroupEnumUnitsInRangeOfLoc(frozen,skill_position, 475.0, null) //The number (3rd in the parenthesis) is the spell's radius.
loop
set freeze = FirstOfGroup(to_freeze)
call PauseUnit(freeze,true)
call GroupRemoveUnit(to_freeze,freeze)
call GroupAddUnit(frozen,freeze)
exitwhen IsUnitGroupEmptyBJ(to_freeze) == true
endloop
set freeze = null
call TriggerSleepAction(5.00) //The number specifies the "wait" duration ,thus the freeze duration.
loop
set freeze = FirstOfGroup(frozen)
call PauseUnit(freeze,false)
call GroupRemoveUnit(frozen,freeze)
exitwhen IsUnitGroupEmptyBJ(frozen) == true
endloop
set freeze = null
endfunction

function condition takes nothing returns boolean
return GetSpellAbilityId() == 'A000' //You'll find the spell id by pressing ctrl+D while browsing its category in the Object Editor. 
endfunction

function InitTrig_Freeze takes nothing returns nothing
set gg_trg_Freeze = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Freeze, EVENT_PLAYER_UNIT_SPELL_EFFECT) 
call TriggerAddCondition(gg_trg_Freeze, Condition(function condition))
call TriggerAddAction(gg_trg_Freeze, function freeze)
endfunction
I would appreciate +rep if this works :infl_thumbs_up:.
If it doesn't tell me what part doesn't work
 

Attachments

  • TriggerAid.w3x
    16.6 KB · Views: 53
Last edited:
Status
Not open for further replies.
Top