Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
I think that function is safe for local clients, so when the camera via a GetCameraTargetPosition... is within the bounds of that region, via some IsPointInRegion native (which may or may not exist), you call that function above.
I think that function is safe for local clients, so when the camera via a GetCameraTargetPosition... is within the bounds of that region, via some IsPointInRegion native (which may or may not exist), you call that function above.
Yeah, this is precisely how I do it in my map. It's perfectly save to call in a local context.
Just grab the camera position in compare it against your rect bounds, and then apply the DNC if needed. Just make sure to rever it when the camera goes back outside the region.
Just grab the camera position in compare it against your rect bounds, and then apply the DNC if needed. Just make sure to rever it when the camera goes back outside the region.
Camera move doesn't have any events associated with it as far as I know. If I was doing this I'd periodically check camera position for each player. If you can be more specific about when/why you want to change the day/night models perhaps there's something else you can use instead, like a unit enters region, spell cast, or unit in range event.
Use a periodic trigger. Basically a trigger that fires every X game seconds. A good time would be every second or 0.5 seconds. Be aware that the change might be instant and so might cause cut in/out as the player pans their camera.
I'm still in the dark completely for this (no pun intended). I still can't find any conditions to go with this per player for camera position.
Basically, all I've got is:
Cave Lighting
Events
Time - Every 0.50 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
It does nothing, I know.
I want to make it so that whenever a player's camera is in "RegionA" and "RegionB," the lights turn off for that player specifically (like @Sir Moriarty and @MyPad mentioned),
but then turn back on when they leave that region.
So, how exactly do I go about executing this?
There is this function which you can use in the if-conditional statement:
JASS:
function RectContainsCoords(rect r, real x, real y) returns boolean
Don't be confused with the rect type, it is simply the JASS equivalent of the GUI region type.
Now, you can use the following natives:
JASS:
constant native GetCameraTargetPositionX() returns real
constant native GetCameraTargetPositionY() returns real
Use those two natives as the parameters in RectContainsCoords. However, you may have to use custom script in its' entirety...
JASS:
if <condition> then
call SetDayNightModels("","")
else
call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdx","Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdx")
endif
The idea is that you evaluate everyones camera synchronously, then use GetLocalPlayer to locally select which model to use for Day/Night based on the synchronous results.
That would be a loop through all players and if GetLocalPlayer is equal to the current player then show that players results.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.