• 🏆 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!

movespeed increase while on blight

Status
Not open for further replies.
Level 7
Joined
Dec 18, 2008
Messages
400
one way to do this could be something like:

Unit enter region

Set Triggering unit's movespeed to x well im not sure but maybe.
 
Level 4
Joined
Mar 6, 2008
Messages
72
I think you can trigger it using the condition 'Unit has Specific buff equal to [true/false].' with some Aura.. I think the Aura of Blight spell detects units on blight, but I might not be completely accurate.
 
Level 7
Joined
Dec 18, 2008
Messages
400
i guess i have just found the answer, or almost.
Unit enter playable map area

If Terrain type comparison equal to (a tile, in this case blight)
Set triggerings movespeed to x
Else do nothing
 
Level 12
Joined
Mar 16, 2006
Messages
992
You'll need a tiny region that constantly moves with the hero.
The region is so you can check if the terrain underneath is blighted.
If it is blighted, you modify the units run speed.

How are you guys so misinformed?
 
Level 7
Joined
Dec 18, 2008
Messages
400
well Vegavak that was what i tried to say exept that you says that he need a tiny region to follow wich i think is right because mine idea only work sif he enter the region.

Or you could just use

Every x second ingame time

pick every units owned by player x

if Terrain type comparison equal to (a tile, in this case blight) at position of triggering unit
Set triggerings movespeed to x
Else do nothing
 
Level 12
Joined
Mar 16, 2006
Messages
992
well Vegavak that was what i tried to say exept that you says that he need a tiny region to follow wich i think is right because mine idea only work sif he enter the region.

Or you could just use

Every x second ingame time

pick every units owned by player x

if Terrain type comparison equal to (a tile, in this case blight) at position of triggering unit
Set triggerings movespeed to x
Else do nothing

Your advice is terrible. Please, stop giving it.
 
Level 9
Joined
May 28, 2007
Messages
365
Easy as this:

JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    local real x = GetUnitX( u )
    local real y = GetUnitY( u )
    if ( GetTerrainType(x, y) == (blight id) ) then
        call SetUnitMoveSpeed(u, faster speed)
    else
        call SetUnitMoveSpeed(u, usual speed)
    endif
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001, 1.00 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
:spell_breaker:
 
Level 13
Joined
May 11, 2008
Messages
1,198
oh, this is how they do the terrain things in that maze creator map huh? that's cool...so instead of blight id you put in info like grass id for grass tile and snow id for snow tile right? i saw map that makes units slide around on ice, how does that work? and lava damaging units seems easy to make and grass killing the unit also seems easy.

and by the way...isn't that an incomplete trigger? don't you have to set local unit u= some unit id or whatever to complete the trigger?
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
slighty modified overloads script:
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    local real x = GetUnitX( 'u001' )
    local real y = GetUnitY( 'u001' )
    BJDebugMsg( GetTerrainType(x, y) )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001, 1.00 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
just run the map, walk on some blight ( put some unit's id in place of 'u001') and watch what number pops up
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
I found some good solution in GUI
you put somewhere blight for example to 1,1 coordinates
every second
and you say If Terrain type on position of <unit> is same as terrain type in 1,1 then give <unit> berserk and order it to use it and remove the berserk (and you make duration 1 so it gets removed as long as unit wont cast it)
 
Status
Not open for further replies.
Top