Different abilities in day and night

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

User avatar
Varoze
Newcomer
Posts: 18
Joined: May 5th, 2008, 7:44 am

Different abilities in day and night

Post by Varoze »

Well, just as the title states.

I need help triggering a unit to get different abilities on different times of the day.
Now, that wouldn't normally be a problem, but my problem is that when night falls, it gets the rank 1 of the ability, regardless of the fact that it was level 5 before nightfall!

So, could anyone help me out here? :)

(Yes, it's kinda a rip-off of the Night Stalker's ability in DotA :P)
User avatar
Luciferianism
Senior Member
Posts: 112
Joined: November 8th, 2008, 4:38 am
Title: God

Re: Different abilities in day and night

Post by Luciferianism »

Use the rawcode of the ability, not the abilities name.
User avatar
Varoze
Newcomer
Posts: 18
Joined: May 5th, 2008, 7:44 am

Re: Different abilities in day and night

Post by Varoze »

Uhm... Sorry, but I don't even know what that is :oops: I'm kinda new to WC3 map modding :)
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Different abilities in day and night

Post by Arabidnun »

I'd say use the

Game - The in-game time of day becomes Equal to 12.00

This uses the 24 hour clock, so configure it using that knowledge
User avatar
Luciferianism
Senior Member
Posts: 112
Joined: November 8th, 2008, 4:38 am
Title: God

Re: Different abilities in day and night

Post by Luciferianism »

Arabidnun wrote:I'd say use the

Game - The in-game time of day becomes Equal to 12.00

This uses the 24 hour clock, so configure it using that knowledge
Um... that doesn't solve anything.
When it gives the ability, it gives it back as level 1.

Instead of using rawcodes, because you don't know how.
Make it based on levels, using If/then functions.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Different abilities in day and night

Post by Arabidnun »

Blah blah blah, set Day_Integer = Level of X ability

Set the Integer(Day or Night)
If/then/else
Condition:
-Unit alive blah blah
-Unit not illusion blah blah
Then:
-Remove Day Ability
-Add Night ability
-Set night ability = Day Integer

Do the same thing, but with night
User avatar
Varoze
Newcomer
Posts: 18
Joined: May 5th, 2008, 7:44 am

Re: Different abilities in day and night

Post by Varoze »

Thank you, Arabidnun, it works now :D
Well... sortof... When it turns night, it says that I can train the day version of the ability again, from lvl 1... Any ideas as to how to fix that?
Well, thanks alot for the help anyway :)
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Different abilities in day and night

Post by Arabidnun »

Did you do add Night Ability
Then Set Night ability to Day_Integer Level?
User avatar
Varoze
Newcomer
Posts: 18
Joined: May 5th, 2008, 7:44 am

Re: Different abilities in day and night

Post by Varoze »

Yeah, I did, but it still shows up as learnable skills at night :/ Oh well, it doesn't really matter :P

But now, I have a problem with another triggered spell I made.
The spell itself is just blink, the hero teleports to a point specified, and the trigger should make the hero invulnerable, then do (Skill level · 200) damage in a 200 radius.
The trigger is currently sometimes working on ONE unit, and looks like this:
Spoiler:

Code: Select all

Blinding Speed
Events
- Unit - A unit Begins casting an ability
Conditions
- (Ability being cast) Equal to Blinding Speed
Actions
- Unit - Make (Casting unit) Invulnerable
- Unit - Cause (Casting unit) to damage circular area after 0.50 seconds of radius 200.00 at (Position of (Casting unit)), dealing (Blinding_Speed_Real x 200.00) damage of attack type Spells and damage type Normal
- Wait 1.00 seconds
- Unit - Make (Casting unit) Vulnerable
Now, I can't find any error in that trigger... Am I just stupid for not seeing it?

Oh, and the set variable trigger looks like this:
Spoiler:

Code: Select all

Blinding Speed Var
Events
- Unit - A unit Learns a skill
Conditions
- (Learned Hero Skill) Equal to Blinding Speed
Actions
- Set Blinding_Speed = (Learned skill level)
- Set Blinding_Speed_Real = (Real(Blinding_Speed))
Please help me :)

EDIT: Actually, it looks like I just need to increase the time between spellcast and doing damage, since it seems to be doing damage at the point I blinked from, not the point I targeted... I'll try this, and tell you if it worked :D

EDIT2: Nope, that didn't help... I'm really confused, it should work, shouldn't it...?

EDIT3: Oh! I fixed it! I changed the - Unit - Cause (Casting unit) to damage circular area after 0.50 seconds of radius 200.00 at (Position of (Casting unit)), dealing (Blinding_Speed_Real x 200.00) damage of attack type Spells and damage type Normal
into
- Unit - Cause (Casting unit) to damage circular area after 0.50 seconds of radius 200.00 at (Target point of ability being cast), dealing (Blinding_Speed_Real x 200.00) damage of attack type Spells and damage type Normal
That seems to have fixed it :D Well, I'll probably be asking more questions here, since I just started my map ^^
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Different abilities in day and night

Post by Arabidnun »

Problem #1) The Blink Spell
Spoiler:

Code: Select all

Spell Blink
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Blink (Neutral)
    Actions
        Wait 0.50 seconds
        Unit - Make (Casting unit) Invulnerable
        Unit - Pause (Casting unit)
        Unit - Cause (Casting unit) to damage circular area after 0.50 seconds of radius 500.00 at (Position of (Casting unit)), dealing ((Real((Level of Blink (Neutral) for (Casting unit)))) x 200.00) damage of attack type Spells and damage type Normal
        Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
        Wait 1.00 seconds
        Special Effect - Destroy (Last created special effect)
        Unit - Make (Casting unit) Vulnerable
        Unit - Unpause (Casting unit)
Unit - Cause (Casting unit) to damage circular area after 0.50 seconds of radius 500.00 at (Position of (Casting unit)), dealing ((Real((Level of Blink (Neutral) for (Casting unit)))) x 200.00) damage of attack type Spells and damage type Normal
Special Effect - Create a special

Highlighted in red is where you problem lies, This trigger will work, because it multiplies the level of ability being cast(Blink in this case) times a constant value which gives it more damage, the more expereinced the hero, the more damage will accure.
Problem #2) I will edit with fix, currently busy atm