• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Really Hard Request, +rep and credits given

Status
Not open for further replies.
Level 3
Joined
Apr 21, 2009
Messages
27
I need a spell that first summons many peasants, around the hero, then they begin to fly and transform into hawks.

LEVELS
Level 1: summons 10 peasants that transform into hawk, the hawks takes 2 damage and have 100 hp
Level 2: summons 11 peasants that transform into hawk, the hawks takes 4 damage and have 100 hp
Level 3: summons 12 peasants that transform into hawk, the hawks takes 6 damage and have 200 hp
Level 4: summons 13 peasants that transform into hawk, the hawks takes 8 damage and have 300 hp
Level 5: summons 14 peasants that transform into hawk, the hawks takes 14 damage and have 400hp
Level 6: summons 15 peasants that transform into hawk, the hawks takes 20 damage and have 500 hp

if anyone could do this they are pro :p
 
Level 11
Joined
Nov 15, 2007
Messages
781
This is not possible in a way that would look good or like a transformation effect. You'd need to create a custom model.
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Use this:
JASS:
function spell takes nothing returns nothing
local group g = CreateGroup()
local unit u = GetSpellAbilityUnit()
local unit h
local location l = GetUnitLoc(u)
local player p = GetOwningPlayer(u)
local integer i = 0
loop
set i = i + 1
call GroupAddUnit(g,CreateUnitAtLoc(p,'hpea',l,270))
exitwhen i == (8 + GetUnitAbilityLevel(u,'A000'))
endloop
call TriggerSleepAction(1.00)
loop
set h = FirstOfGroup(g)
if IsUnitDeadBJ(h) == false then
call GroupRemoveUnit(g,h)
if GetUnitAbilityLevelSwapped('A000',h) == 1 then
call CreateUnitAtLoc(p,'h000',GetUnitLoc(h),GetUnitFacing(h))
else
if GetUnitAbilityLevelSwapped('A000',h) == 2 then
call CreateUnitAtLoc(p,'h000',GetUnitLoc(h),GetUnitFacing(h))
else
if GetUnitAbilityLevelSwapped('A000',h) == 3 then
call CreateUnitAtLoc(p,'h000',GetUnitLoc(h),GetUnitFacing(h))
else
call CreateUnitAtLoc(p,'h000',GetUnitLoc(h),GetUnitFacing(h))
endif
endif
endif
call RemoveUnit(h) // 'A000' is the spell id, replace it with yours
else // 'hpea' is the peasant id, should be the same, if its not custom
call GroupRemoveUnit(g,h) // 'h000' has to be a different unit for each level, with the properties you want
endif // To see the codes, press Ctrl+D it the object Editor
exitwhen IsUnitGroupEmptyBJ(g) == true
endloop
set i = 0
call DestroyGroup(g)
set u = null
set h = null
set p = null
call RemoveLocation(l)
endfunction

function condition takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction

function InitTrig_Spell takes nothing returns nothing
    set gg_trg_Spell = CreateTrigger( )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Spell, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_Spell, Condition( function condition ) )
    call TriggerAddAction( gg_trg_Spell, function spell)
endfunction
Trigger name must be Spell for this to work.
 
Status
Not open for further replies.
Top