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

All point variables being treated as center of playable map area

Status
Not open for further replies.
Level 8
Joined
Mar 3, 2009
Messages
327
Like the title says. Its absolutely retarded...

If you don't believe me download it. Pick druid as hero and try his lightning spell. No matter where you target everything will happen at the center of the map. I tried using different array indexes, a new point variable but its still stuffed.

have i done something really stupid? or is there some way to fix it? because i don't really feel like starting the map again...
 

Attachments

  • GBF.w3x
    43.8 KB · Views: 39
Level 8
Joined
Mar 3, 2009
Messages
327
Is the wait stuffing it up?

I dont think it can... Try the druid's summoning spell too. It makes the summons at the center of the map.

edit: wow it does work if i set it before the wait. But still... how does the wait stuff it up?
summons still arent working either
 
Lightning Strike (it responds to the rawcode of your ability)
You just need to create 3 variables:
• L_Hash (Hashtable)
• L_Caster (Unit)
• L_Group (Unit Group)

  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Hashtable - Create a hashtable
    • Set L_Hash = (Last created hashtable)
JASS:
function Trig_lightning_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A00E'
endfunction

function Filter1 takes nothing returns boolean
    local unit filt = GetFilterUnit()
    if IsUnitEnemy (filt, GetOwningPlayer(udg_L_Caster)) then
        call UnitDamageTarget (udg_L_Caster, filt, 50, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
    endif
    return true
    set filt = null
endfunction

function Timer takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local integer id = GetHandleId(t)
    local real x = LoadReal (udg_L_Hash, id, StringHash("x"))
    local real y = LoadReal (udg_L_Hash, id, StringHash("y"))
    local effect sfx 
    call AddSpecialEffect("Doodads\\Cinematic\\Lightningbolt\\Lightningbolt.mdl", x, y)
    call GroupEnumUnitsInRange (udg_L_Group, x, y, 300, Filter (function Filter1))
    set t = null
    call DestroyTimer (t)
    call FlushChildHashtable (udg_L_Hash, id)
    call DestroyEffect (sfx)
endfunction

function Trig_lightning_Actions takes nothing returns nothing
    local real x = GetSpellTargetX()
    local real y = GetSpellTargetY()
    local timer t = CreateTimer()
    local unit u = GetTriggerUnit()
    local real r = GetRandomReal (0, 3)
    set udg_L_Caster = u
    call SaveReal (udg_L_Hash, GetHandleId(t), StringHash("x"), x)
    call SaveReal (udg_L_Hash, GetHandleId(t), StringHash("y"), y)
    call TimerStart (t, r, false, function Timer)
    set u = null
    set t = null
endfunction

//===========================================================================
function InitTrig_lightning takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function Trig_lightning_Conditions ) )
    call TriggerAddAction( t, function Trig_lightning_Actions )
endfunction

For the Call of the Wild, you have an error:
  • Set temppoint[0] = (temppoint[0] offset by 100.00 towards (Facing of (Casting unit)) degrees)
You offset the wrong point; it should be temppoint[1] offset by 100.00..
 
Level 8
Joined
Mar 3, 2009
Messages
327
ah lol. I was messing around with all the point references to see if i could fix it before.

Thanks for your effort in the lightning spell, but it only really needs to be a 4 player max mpi spell, which i can make with some locals. but anyways, thanks a lot ^^
 
Status
Not open for further replies.
Top