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

Darkness

Status
Not open for further replies.
Level 9
Joined
Apr 4, 2004
Messages
519
Alright, I need some help, I might be posting it in wrong forum section, but since it's about the terrain all in the end I figured I'd post it here.

How is it possible to make a map pitch black? I've done some "try-to-find-your-way" map and with this pitch black thing it'd add a very nice effect. Though, of course, I need some light source around the playable character, say a torch or so. lightning up the surrounding enviroment.

Thankful for answers.
 
Level 9
Joined
Apr 4, 2004
Messages
519
Pitch Blackness - Custom script: call SetDayNightModels("","")
Reverse it back to day - Custom script: call SetDayNightModels("Environment\\DNC\\DNCAshenvale\ \DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl" , "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\ \DNCAshenvaleUnit.mdl" )

If you mean that one, it doesn't work for me. The map becomes unplayable.
 
Level 9
Joined
Feb 3, 2006
Messages
326
ok, use custom scripts, so Custom Script then in it put:

Call SetDayNightModels(",")

Or for normal

Call SetDayNightModels("Environment\\DNC\\DNCAshenvale\ \DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl" , "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleU nit\ \DNCAshenvaleUnit.mdl")

It should work!!

AND this is not JASS script, its trigering custom script.
 
Level 9
Joined
Apr 4, 2004
Messages
519
Which mainly means I'm suppose to put it in the Custom Script Code window. I put the code at that place, like this.
Call SetDayNightModels("Environment\\DNC\\DNCAshenvale\ \DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl" , "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleU nit\ \DNCAshenvaleUnit.mdl")

But when I save the map, this error comes up.
erroruv7.jpg


*EDIT* I noticed in the code now that it says Ashenvale, I changed it to SunkenRuins but got the same results. My map's based on Sunken Ruin tilesets.
 
Level 18
Joined
Jan 24, 2006
Messages
1,938
Which mainly means I'm suppose to put it in the Custom Script Code window. I put the code at that place, like this.


But when I save the map, this error comes up.
erroruv7.jpg


*EDIT* I noticed in the code now that it says Ashenvale, I changed it to SunkenRuins but got the same results. My map's based on Sunken Ruin tilesets.

Not the custom script section, he means use the GUI action "Custom Script" fool, and Shadowz123 you've got to remember JASS is case-sensitive, so the "call" can't have a capital C.

-*meow*
 
Level 9
Joined
Apr 4, 2004
Messages
519
Oh, aye. I got it now. :p I tested it on an Ashenvale based map, and it worked. But it doesn't work on my Sunken Ruins based map, I changed the Ashenvale names in the code to SunkenRuins, but doesn't seem to work eitherway. How do ya get it to work?
 
Level 9
Joined
Feb 3, 2006
Messages
326
If i were you, just keep it as Ashenvale, unken Ruins has its own file name different to Ashenvale which im unaware of. Check through the MPQ, you may find it.



Not the custom script section, he means use the GUI action "Custom Script" fool, and Shadowz123 you've got to remember JASS is case-sensitive, so the "call" can't have a capital C.

-*meow*

I never learned JASS so i dont know.
 
Level 9
Joined
Feb 3, 2006
Messages
326
Ok, theres 2 ways, like Shados Explained above using JASS or using triggers by copying

Call SetDayNightModels("Environment\\DNC\\DNCAshenvale\ \DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl" , "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleU nit\ \DNCAshenvaleUnit.mdl")

and pasting it into a custom script.

and back to normal is

Call SetDayNightModels("","")

So, in triggers, actions its in General section. Find Custom Script and put them into it!
 
Level 9
Joined
Apr 4, 2004
Messages
519
Aye, I did this:

1. Copied the code.
Call SetDayNightModels("Environment\\DNC\\DNCAshenvale\ \DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl" , "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleU nit\ \DNCAshenvaleUnit.mdl")
2. Opened the Trigger Editor.
3. Made a new action in the chosen Trigger, chose General -> Custom Script.
4. Pasted the script in the code section.
5. Clicked ok.
6. Test-runned the game.
7. Got this:
error2ho3.jpg


Did I miss something?
 
Level 9
Joined
Apr 4, 2004
Messages
519
Omg h4x l33t Jass!!!!!!! We're using Custom Script Action, not Jass!!!!111OneOneElevenOnehundredeleven
 
Level 9
Joined
Apr 4, 2004
Messages
519
I've tried a few things but it still don't work. I get this error.

function Trig_Darkness_Actions takes nothing returns nothing
call SetDayNightModels("Environment\\DNC\\DNCAshenvale\ \DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl" , "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleU nit\ \DNCAshenvaleUnit.mdl")
endfunction
 
Level 9
Joined
Apr 4, 2004
Messages
519
call SetDayNightModels("Environment\\DNC\\DNCAshenvale\\DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl","Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl")

Like that instead? :p I'm not a scripter so I have no idea what to change.
 
Level 9
Joined
Feb 3, 2006
Messages
326
call SetDayNightModels("Environment\\DNC\\DNCAshenvale\ \DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl","En vironment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl")

There was a space between DN and C, use that above.

OMG. wtf

ok...

call SetDayNightModels("Environment\\DNC\\DNCAshenvale\\DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl",
"Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl")

i cant remove spaces, just put them together in the custom script. See, the spaces between some of the \\ like \ \, rmeove the space.
 
Level 9
Joined
Apr 4, 2004
Messages
519
I was able to save the map now without getting an error message when I had the trigger Enabled. But the darkness won't take effect when I test run the map. :p
 
Status
Not open for further replies.
Top