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

Making name of each region display when camera is over that region

Status
Not open for further replies.
Level 8
Joined
Oct 1, 2010
Messages
408
OK so here is my problem. Outland Risk is going to have a lot of different regions that are all quite close to each other but which have no distinct borders. For instance, there's about 8 different regions in SMV, so tiles and terrain is not really enough to make a clear distinction between region borders. My initial solution was to have the name of each region be displayed on the player's screen when they enter a new region, then have the message fade after 3 seconds and have a command to disable this function. By this I don't mean units entering a new region but when a player's camera moves from one region to the next, so it would be quick and easy to tell which bases belonged to which regions. However, I have been told this is not possible. Does anyone know a way to make it possible or does anyone have a better solution?

Thank you so very much for any help!
 
Level 12
Joined
Apr 16, 2010
Messages
584
It could be done if camera is moved my triggers not a player, so you just could use boolean variable to check if camera is in region 1 move it to region 2 set variable to true and display text. But if camera is moved by player then i don;t think it will be simple or possible. But i heard that in vJASS you can detect where is the cursor, so you might wanna use this system. Somewhere seen it on the hive, don't remember where. But maybe there's a way to detect current camera position too, good luck finding it then. Also ask for help at Triggers & Scripts forum, for camera detection, or search.
 
Level 8
Joined
Oct 1, 2010
Messages
408
I do believe this would work, thought its not the most practical or aesthetically pleasing solution. But thank you very much nonetheless. + rep!

Edit: Darn I cannot give you any more rep yet...

Also, I would not label this as being 'solved' yet as I would prefer a better solution for my purposes. But still, thanks mckill.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
...By this I don't mean units entering a new region but when a player's camera moves from one region to the next, so it would be quick and easy to tell which bases belonged to which regions....

If you can elaborate just a few thing on this one, I'll be glade to make you a test map =D
I just need you to clarify it in a simpler way, but understandable =D
 
Level 8
Joined
Oct 1, 2010
Messages
408
Hmm... OK I will try!

A player moves his camera to region called 'Vortex Pinnacle'. A message is then displayed on the players screen in large letters saying 'Entering Vortex Pinnacle'. This message will fade in 3 seconds unless the player moves his camera (by which I mean his screen) over a new region before then. If the player moves his camera over another region a message is displayed on his screen that says 'Entering (name of region)'.

If you have played risk on warcraft 3 you will know what a region is. If not, I will try to explain. A region is a small area that is made up of any number of bases. Usually 2-6. Owning an entire region gives additional income to a player per turn.

Knowing what bases belong to what regions is crucial so that players can maximize their income and know what bases they need to control a region, which will increase their income.

If such a message is possible, there would have to be a command to disable it also, as it would get very annoying very fast unless you were wanting to see this message.

OK, not exactly shorter but I think better explained, hope you understand now :) thank you!
 
Give this a try:
  • Region
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- temp_point is a Point variable --------
      • Set temp_point = (Target of current camera view)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Region 000 <gen> contains temp_point) Equal to True
        • Then - Actions
          • -------- Region 000 is your region --------
          • -------- //Apply actions --------
        • Else - Actions
      • Custom script: call RemoveLocation(udg_temp_point)
There are other ways if that doesn't work.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Give this a try:
  • Region
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- temp_point is a Point variable --------
      • Set temp_point = (Target of current camera view)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Region 000 <gen> contains temp_point) Equal to True
        • Then - Actions
          • -------- Region 000 is your region --------
          • -------- //Apply actions --------
        • Else - Actions
      • Custom script: call RemoveLocation(udg_temp_point)
There are other ways if that doesn't work.

Every 0.03 seconds, will the message appears ?
"Unit Entering: Vortex Pinnacle" ?
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
I do believe this would work, thought its not the most practical or aesthetically pleasing solution. But thank you very much nonetheless. + rep!

Edit: Darn I cannot give you any more rep yet...

Also, I would not label this as being 'solved' yet as I would prefer a better solution for my purposes. But still, thanks mckill.

no probs, try GhostThruster's suggestion then...
 
Status
Not open for further replies.
Top