• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

how can i do this?

Status
Not open for further replies.
Level 19
Joined
May 1, 2008
Messages
1,130
i have a playable outdoors terrain and cave
i want so that outdoors i will have day/night cycle but in the cave i want it to be night always
can it be done?
 
Level 19
Joined
Oct 29, 2007
Messages
1,184
This is the only thing I can think of.

Detect when somebody enters the cave, or when a player looks into it and do:

  • Custom script: if ( GetLocalPlayer() == Player(NUMBER OF THE TRIGGERING PLAYER) ) then
  • Game - Set the time of day to 24.00
  • Custom script: endif
Player 1 = 0, Player 2 = 1 etc..

This will make it night only for the picked player.

However, I'm not sure if this will cause disconnect in multiplayer. You gotta try it.
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
  • Dungeon
    • Events
      • A unit enters Region (Over the dungeon)
    • Conditions
      • Unit type equal to YOURUNIT/PLAYER
    • Actions
      • Turn on Dungeon Nigth
  • Dungeon Nigth
    • Events
      • Every 0.1 seconds of the day
    • Conditions
    • Actions
      • Set Day Time 24:00
  • Dungeon Off
    • Events
      • A unit leaves YourRegion
    • Conditions
      • Unit Type Equal to URUNIT/PLAYER
    • Actions
      • Turn off Dungeon Nigths
 
Level 19
Joined
May 1, 2008
Messages
1,130
the options you guys shown me aren't mpi
idk about megafir's option though
but ill go for void's idea
 
Level 34
Joined
Sep 6, 2006
Messages
8,873
RDZ leaves all his maps open source, does he not? Pretty sure he does.
Custom light sources are the only answer I can think of for multiplayer. RDZ probably just used triggers to change the cycle since it's single player.

  • Dungeon
    • Events
      • A unit enters Region (Over the dungeon)
    • Conditions
      • Unit type equal to YOURUNIT/PLAYER
    • Actions
      • Turn on Dungeon Nigth
  • Dungeon Nigth
    • Events
      • Every 0.1 seconds of the day
    • Conditions
    • Actions
      • Set Day Time 24:00
  • Dungeon Off
    • Events
      • A unit leaves YourRegion
    • Conditions
      • Unit Type Equal to URUNIT/PLAYER
    • Actions
      • Turn off Dungeon Nigths
This is a terrible method. What if a unit enters while another one is in there? Once one leaves, it screws it up.
 
Level 9
Joined
Jul 3, 2008
Messages
495
This is the only thing I can think of.
  • Custom script: if ( GetLocalPlayer() == Player(NUMBER OF THE TRIGGERING PLAYER) ) then
  • Game - Set the time of day to 24.00
  • Custom script: endif

This will desync in multiplayer since there is a trigger to check the ingame times. And think about that night elf got an ability that increase the sight range at the night. What if its day for player1 and night for player2?

Hower I dont think this will desync:

Event: Something
JASS:
if GetLocalPlayer() == Player(0) then
call SetDayNightModels("something","something")
endif
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
I'm pretty sure changing time of day causes desynch. DayNight models probably doesn't.

If you have only one unit, just check if the unit is inside the cave or not (if that's the case, change darkness). If you have multiple units, do a periodic check if your camera target point is inside the cave and change the darkness accordingly.
 
Status
Not open for further replies.
Top