Night Stalker help ^^

WastedSavior

A day without sunshine is like, well, night.
Reaction score
213
:cool: im making a vampires, vrs werewolves, vrs hunters map, and id like to have the vampires and werewolves gain abilitys at night, while the hunters gain at day.. Sorta like the Night Stalker Ability from dota, If anyone knows how the NS ability from dota works? can ya please tell me?
 
please search before posting
Originally Posted By Emiljr
Code:
function Trig_Hunter_in_the_Night_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Udre' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Hunter_in_the_Night_Func002Func003C takes nothing returns boolean
    if ( not ( GetTimeOfDay() >= 6.00 ) ) then
        return false
    endif
    if ( not ( GetTimeOfDay() <= 18.00 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Hunter_in_the_Night_Func002C takes nothing returns boolean
    if ( not ( GetLearnedSkillBJ() == 'A086' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Hunter_in_the_Night_Func003Func002C takes nothing returns boolean
    if ( not ( GetTimeOfDay() >= 6.00 ) ) then
        return false
    endif
    if ( not ( GetTimeOfDay() <= 18.00 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Hunter_in_the_Night_Func003C takes nothing returns boolean
    if ( not ( GetLearnedSkillBJ() == 'A08E' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Hunter_in_the_Night_Actions takes nothing returns nothing
    if ( Trig_Hunter_in_the_Night_Func002C() ) then
        call UnitAddAbilityBJ( 'S00A', GetTriggerUnit() )
        if ( Trig_Hunter_in_the_Night_Func002Func003C() ) then
            call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), 5 )
        else
            call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A086', GetTriggerUnit()) )
        endif
    else
        call DoNothing(  )
    endif
    if ( Trig_Hunter_in_the_Night_Func003C() ) then
        call UnitAddAbilityBJ( 'A08C', GetTriggerUnit() )
        if ( Trig_Hunter_in_the_Night_Func003Func002C() ) then
            call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), 5 )
        else
            call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A08E', GetTriggerUnit()) )
        endif
    else
        call DoNothing(  )
    endif
endfunction

//======================================================================  =====
function InitTrig_Hunter_in_the_Night takes nothing returns nothing
    set gg_trg_Hunter_in_the_Night = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunter_in_the_Night, EVENT_PLAYER_HERO_SKILL )
    call TriggerAddCondition( gg_trg_Hunter_in_the_Night, Condition( function Trig_Hunter_in_the_Night_Conditions ) )
    call TriggerAddAction( gg_trg_Hunter_in_the_Night, function Trig_Hunter_in_the_Night_Actions )
endfunction



if u can make sense of that good luck, it is not that complicated to see pretty much what it does w/o even knowing any JASs, here is a little help for you though

A086=Hunter in the Night ability
A08E=crippling fear ability
A08C=dummy ability which gives movement speed and chance to miss for crippling fear
S00A-dummy ability which gives the movement speed and attack speed for Hunter in the Night Ability


now for the Darkness ability, there are no triggers needed, just use an ability like the one the NE have that makes it night, and give it the effect of item change time of day, and that should do the trick

i hope this all helped!
 
im thinking so, unless you get EXTREMELY complex... which would take about 3 days to get the trigger layed out in GUI...
 
Hmm can't you just make an event for time of day becomes. And then pick all units in map, if unit has night stalker ability level 1, give that unit night stalker buffs level 1. If level 2, give level 2 buffs etc. Seems easy enough to me. Oh and when it becomes night, take them away of course.

Try this with GUI it sounds easy.
 
Stop referring shit to dota!

Just use a game time of day event add the abilities and remove at the opposite time of day.
 
lol for you GUI might sound easy, and yes rad DOTA SUCKS HORRIBLY!!! (excuse me...) But i would have to think the hole thing through for like ever...
 
DotA's awesome. There is no need for the trigger above to be in Jass as all those can be done in the GUI.
 
that is from an unprotected DotA map, so its in JASS, that in GUI would be very short, aks someone who knows jass well and they could emulate it in GUI in a matter of minutes
 
> ... they could emulate it in GUI in a matter of minutes

Well, FWIW, the JASS trigger posted looks like this in GUI (*):

Code:
Hunter in the night
    Events
        Unit - A unit Learns a skill
    Conditions
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Learned Hero Skill) Equal to Blizzard
            Then - Actions
                Unit - Add Banish to (Triggering unit)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (In-game time of day) Greater than or equal to 6.00
                        (In-game time of day) Less than or equal to 18.00
                    Then - Actions
                        Unit - Set level of Banish for (Triggering unit) to 5
                    Else - Actions
                        Unit - Set level of Banish for (Triggering unit) to (Level of Blizzard for (Triggering unit))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Learned Hero Skill) Equal to Flame Strike
            Then - Actions
                Unit - Add Battle Roar to (Triggering unit)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (In-game time of day) Greater than or equal to 6.00
                        (In-game time of day) Less than or equal to 18.00
                    Then - Actions
                        Unit - Set level of Battle Roar for (Triggering unit) to 5
                    Else - Actions
                        Unit - Set level of Battle Roar for (Triggering unit) to (Level of Flame Strike for (Triggering unit))
            Else - Actions

That said, I would strongly recommend re-reading posts #5 and #6... :)



(*) with different unit-types and ability-names...
 
alright I am making a Lycan character, who at night gets the buffs and such, and also changes form

now looking at the GUI dota trigger, it dont seam like it would work, only when the unit first learns the skill, not all game, i tried it , and sure enoguh, no dice

so I figure Ill make two triggers, one the checks for each game time, then to add and remove the abilities needed

but here inlies another problem, what if the unit is dead during this time, they wont get the stuff added after they respawn

so im guessing id need a trigger that turned on another at night, which checked every few seconds if the unit had tha abilities, and if not it adds them, that should work fine, then the other trigger thats turns on another that checks every few seconds if the char has the abilities during the day, and removes them

or maybe I could just have 1 trigger that ran every so often, checked the game time, then added/removed abilties accordingly, that sounds even better

now for the changing of the model part, the best thing I can think to do is to add a meta ability, have the unit cast it, so that they change form, but I dont want the ability to show up added on the character, so could I remove it after cast? then when night is over add it again and maybe tell them to uncast it or something, I am a little confused at this part, any help guys?
 
so this is what I got....but still I get nothing

Code:
werewolf
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set werewolf = (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to Lycanthrope))
        Set werewolf_1 = (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to Lycanthrope))
        Unit Group - Pick every unit in werewolf and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (In-game time of day) Greater than or equal to 6.00
                        (In-game time of day) Less than or equal to 18.00
                    Then - Actions
                        Unit - Set level of Werewolf (move & attack) for (Triggering unit) to 4
                        Unit - Set level of Werewolf Leech  for (Triggering unit) to 4
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) has buff Werewolf ) Equal to True
                            Then - Actions
                                Unit - Add Shapeshift  to (Triggering unit)
                                Unit - Order (Triggering unit) to Night Elf Demon Hunter - Metamorphosis
                                Wait 2.00 seconds
                                Unit - Remove Shapeshift  from (Triggering unit)
                            Else - Actions
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) has buff Werewolf ) Equal to False
                            Then - Actions
                                Unit - Add Shapeshift  to (Triggering unit)
                                Unit - Order (Triggering unit) to Night Elf Demon Hunter - Metamorphosis
                                Wait 2.00 seconds
                                Unit - Remove Shapeshift  from (Triggering unit)
                            Else - Actions
                        Unit - Set level of Werewolf (move & attack) for (Triggering unit) to (Level of Werewolf  for (Triggering unit))
                        Unit - Set level of Werewolf Leech  for (Triggering unit) to (Level of Werewolf  for (Triggering unit))
        Unit Group - Pick every unit in werewolf_1 and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (In-game time of day) Greater than or equal to 6.00
                        (In-game time of day) Less than or equal to 18.00
                    Then - Actions
                        Unit - Set level of Werewolf (move & attack) for (Triggering unit) to 4
                        Unit - Set level of Werewolf Leech  for (Triggering unit) to 4
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) has buff Werewolf ) Equal to True
                            Then - Actions
                                Unit - Add Shapeshift  to (Triggering unit)
                                Unit - Order (Triggering unit) to Night Elf Demon Hunter - Metamorphosis
                                Wait 2.00 seconds
                                Unit - Remove Shapeshift  from (Triggering unit)
                            Else - Actions
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) has buff Werewolf ) Equal to False
                            Then - Actions
                                Unit - Add Shapeshift  to (Triggering unit)
                                Unit - Order (Triggering unit) to Night Elf Demon Hunter - Metamorphosis
                                Wait 2.00 seconds
                                Unit - Remove Shapeshift  from (Triggering unit)
                            Else - Actions
                        Unit - Set level of Werewolf (move & attack) for (Triggering unit) to (Level of Werewolf  for (Triggering unit))
                        Unit - Set level of Werewolf Leech  for (Triggering unit) to (Level of Werewolf  for (Triggering unit))
        Custom script:   call DestroyGroup(udg_werewolf)
        Custom script:   call DestroyGroup(udg_werewolf_1)
 
AceHart said:
The event "every X seconds" doesn't set a "Triggering unit".

dont think i quite understand, y does there need to be a triggering unit?
 
Your trigger uses, for example:
Unit - Set level of Werewolf (move & attack) for (Triggering unit) to 4

Now, given that there isn't a "Triggering unit"... it won't do much.
 
AceHart said:
Your trigger uses, for example:
Unit - Set level of Werewolf (move & attack) for (Triggering unit) to 4

Now, given that there isn't a "Triggering unit"... it won't do much.


lol, great scotts your right...what was I thinking

btw I love how your giving it to me piece by piece.....

edit: no go, still aint working
 
AceHart said:
> I love how you're giving it to me piece by piece...

Thanks. I try my very best :D


Happy mapping,
AceHart


still no go, this is what I currently got

Code:
werewolf
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set werewolf = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Lycanthrope))
        Set werewolf_1 = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Lycanthrope))
        Unit Group - Pick every unit in werewolf and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (In-game time of day) Greater than or equal to 6.00
                        (In-game time of day) Less than or equal to 18.00
                    Then - Actions
                        Unit - Set level of Werewolf (move & attack) for (Picked unit) to 4
                        Unit - Set level of Werewolf Leech  for (Picked unit) to 4
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) has buff Werewolf ) Equal to True
                            Then - Actions
                                Unit - Add Shapeshift  to (Picked unit)
                                Unit - Order (Picked unit) to Night Elf Demon Hunter - Metamorphosis
                                Wait 2.00 seconds
                                Unit - Remove Shapeshift  from (Picked unit)
                            Else - Actions
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) has buff Werewolf ) Equal to False
                            Then - Actions
                                Unit - Add Shapeshift  to (Picked unit)
                                Unit - Order (Picked unit) to Night Elf Demon Hunter - Metamorphosis
                                Wait 2.00 seconds
                                Unit - Remove Shapeshift  from (Picked unit)
                            Else - Actions
                        Unit - Set level of Werewolf (move & attack) for (Picked unit) to (Level of Werewolf  for (Picked unit))
                        Unit - Set level of Werewolf Leech  for (Picked unit) to (Level of Werewolf  for (Picked unit))
        Unit Group - Pick every unit in werewolf_1 and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (In-game time of day) Greater than or equal to 6.00
                        (In-game time of day) Less than or equal to 18.00
                    Then - Actions
                        Unit - Set level of Werewolf (move & attack) for (Picked unit) to 4
                        Unit - Set level of Werewolf Leech  for (Picked unit) to 4
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) has buff Werewolf ) Equal to True
                            Then - Actions
                                Unit - Add Shapeshift  to (Picked unit)
                                Unit - Order (Picked unit) to Night Elf Demon Hunter - Metamorphosis
                                Wait 2.00 seconds
                                Unit - Remove Shapeshift  from (Picked unit)
                            Else - Actions
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked unit) has buff Werewolf ) Equal to False
                            Then - Actions
                                Unit - Add Shapeshift  to (Picked unit)
                                Unit - Order (Picked unit) to Night Elf Demon Hunter - Metamorphosis
                                Wait 2.00 seconds
                                Unit - Remove Shapeshift  from (Picked unit)
                            Else - Actions
                        Unit - Set level of Werewolf (move & attack) for (Picked unit) to (Level of Werewolf  for (Picked unit))
                        Unit - Set level of Werewolf Leech  for (Picked unit) to (Level of Werewolf  for (Picked unit))
        Custom script:   call DestroyGroup(udg_werewolf)
        Custom script:   call DestroyGroup(udg_werewolf_1)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top