A spell that turns day into night

YaY_simulato

New Member
Reaction score
4
Ok, i have made an spell that turns a shaman into werewolf, i would like to make an extra effect on the spell, so that when it is cast the game time would set into night and last as long as the spell does and then return into the game time where it was.

Like:
-spell is cast
-transformation
-game time becomes night
-lasts for 60 seconds
-game time returns where it was

How to do this? :)
 

Notti

New Member
Reaction score
1
Code:
Time Of Day
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Storm Bolt
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                integerVariable Equal to 0
            Then - Actions
                Set realVariable = (In-game time of day)
            Else - Actions
        Set integerVariable = (integerVariable + 1)
        Game - Set the time of day to 24.00
        Game - Turn the day/night cycle Off
        Wait 2.00 seconds
        Set integerVariable = (integerVariable - 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                integerVariable Equal to 0
            Then - Actions
                Game - Set the time of day to realVariable
                Game - Turn the day/night cycle On
            Else - Actions

If the unit dies, you might want to make the night into day again...
Not MUI, but does it matter?
 

Lyle.

New Member
Reaction score
32
There is an ability <Change Time of Day> That's the ability used for the Item Moon Stone.

-Just like DotA
 

Lyle.

New Member
Reaction score
32
Better that its trigger, since i have no idea what MUI is xD

I think you should really go look at Change Time of Day, as far as I can tell it's exactly what you want.

All you need to change:
Stats - Duration 60
Hero Ability - True
 

YaY_simulato

New Member
Reaction score
4
What kind of variable it has to be? i made variable: realVariable and i dont know whats the variable type to get that:

Set realVariable = (in game time of day)

To Lyle, i know that one, but the time of the day change needs to happen when an ability is cast
 

Notti

New Member
Reaction score
1
RealVariable is a type of REAL. A variable can be named whatever you want!

Change time of day is in DotA, but cannot be used here, or it could but...

He uses morph ability (metamorphosis for instance...), just a simple trigger to make the day/night into night for sure.

MUI; multi unit instanceable.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top