• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Camera Locked behind a unit

Status
Not open for further replies.
I believe something like this will work as you want.
Just change the periodic event time to your liking.

  • CameraMovement
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • YourUnit Not equal to No unit
    • Actions
      • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of YourUnit) over 0.05 seconds
      • Camera - Lock camera target for Player 1 (Red) to YourUnit, offset by (0.00, 0.00) using Default rotation
 
Damn you and your rightlyness happy tauren. So how exactley do i make that work? What do i put do get it to do the cameras for each player. Heres the trigger so far:
  • Cameras
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • If (bPlayerDead[1] Equal to False) then do (Camera - Lock camera target for Player 1 (Red) to Player1, offset by (0.00, 50.00) using Default rotation) else do (Do nothing)
      • If (bPlayerDead[2] Equal to False) then do (Camera - Lock camera target for Player 2 (Blue) to Player2, offset by (0.00, 50.00) using Default rotation) else do (Do nothing)
      • If (bPlayerDead[6] Equal to False) then do (Camera - Lock camera target for Player 6 (Orange) to Player6, offset by (0.00, 50.00) using Default rotation) else do (Do nothing)
      • If (bPlayerDead[7] Equal to False) then do (Camera - Lock camera target for Player 7 (Green) to Player7, offset by (0.00, 50.00) using Default rotation) else do (Do nothing)
      • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of Player1) over 0.05 seconds
      • Camera - Set Player 2 (Blue)'s camera Rotation to (Facing of Player2) over 0.05 seconds
      • Camera - Set Player 6 (Orange)'s camera Rotation to (Facing of Player6) over 0.05 seconds
      • Camera - Set Player 7 (Green)'s camera Rotation to (Facing of Player7) over 0.05 seconds
The Player[#] is the unit that it gets locked too.
So how do i make your think work Tauren?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
This is not possiable in GUI, HappyTauren is right so use his system (learn jass) or drop the idea of camera behind a unit. I recommend looking in the tutorials sections for jass knowledge or asking in the jass fourm (only if you really are not understanding a part of jass), they are both good places to go. Thats how most people here learned jass.
 
Level 7
Joined
Dec 26, 2006
Messages
303
Before you do this please make sure with your terrain, camera system like this always have an almighty problem that cant solved (if you the maker you will think ratter be died), you can see this even at Nature's Call RotD...

The goblin maze, when you step wrong and move in bad position all of the monitor are closed by wall... Can you keep plat with it?
 
Hmm. Well im modifying the Warchasers map made by blizzard (trying to make it more interesting) and the cam lock they have is terrible, so im trying to make the cam better. And ive changed the heros (have them making sense now).

I'm not that great with that kind of coding though.

Well HappyTauren if its not too much trouble could you do it? Ill send the map to you or post.
 
Level 7
Joined
Dec 26, 2006
Messages
303
How much angled down?? Make sure you not make it too much down coz I remember if War Chasers have a hundred of walls and once the walls block your sight you can control your hero, all you can do is 'restart game'
 
Level 7
Joined
Dec 26, 2006
Messages
303
When the camera stuck your heroes does it will automatically or you must write unstuck?? Fell good you take point from my opinion
 
Level 7
Joined
Dec 26, 2006
Messages
303
That's a reason why he ask us a help, so what you must to do is:
1.Make it not flat anymore, do the best you can
2.farZ make problem? reduce your sight range make you only see nearby and cause system didn't read unit outside your sight, might reduce lags slightly
3.Why it's unusable? all MMO-RPG game use camera like this, not bad to do this in war3 maps
4.Like i said at 2, reduce sight range to 600(smaller is better).. Make lag reduced


HappyTauren please don't crush his dream with your 4 reason, the number 4 is as the same as number 2 so you must make it simpler. ONLY 3 REASON
 
Level 7
Joined
Dec 26, 2006
Messages
303
Satisfied devastatingly, anyway I afraid if you feel my post have a little of offensive mean... I am sorry if you feel so
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
WC3 game engine IS NOT TES:Oblivion. It is not made to handle distent LOD and even with low sightrange distant doodads are still rendered resulting in lag on well teraned maps with cards weaker than a Nveda 7800 GS. Also due to delay and bad syncro in multiplayers the camera is always delayed and you can not use the keyboard and mouse like you can do in oblivion and other good rpgs. Most games like FPS do the camera unsyncronized from other players so you can look at a direction before your animation updates to other people to show you looking in that direction. In wc3 the cameras have to be syncronized or else it would split. If you wat good FPS systems move to moding TES: Oblivion since there, the graphich card is your limates and that is hardly very limated. Since this topic was started in GUI and Deep Sea Kraken probably does not no jass, this is staying here untill he confirms he wants it moved to the jass section.
 
Hmm. Well if it will get HappyTauren to help me, could you please move it? and ty Dr Super Good.

@HappyTauren heres my response to your 4 points:
1)if youll help me with jass, that wont be a problem.
2)Shorten sight radius And I dont want the camera staring straight ahead, more like a downward angle of 10-20
3)Ive seen it in a Multi-player game, and there were different hight levels
4)One way to reduce lag is to set the point value for all units that are used to 0, that heavily reduces lag.

If it helps, each player has their own idividual camera.
 
okay. Basic idea of system is that it locks camera view behind a unit. Then, if there are many heights, it will need to calculate FarZ. Then it will change AoA in order tp make sight viewable (calculates z of the point where is camera start and where is camera end) And then it makes AoA sway as there is differance in heights.

BUT

Not all heights can be calculated. Stupid wc3 engine wont calculte low height if it is around many high heights. That will be buggy. I will have to make calculation which would tone this problem down and make it as less noticable as possiable. I will post this soon, i alrady made system like that a time ago. Also, do you want unit to be moveable with keyboard? and Is this singleplayer map?
 
Status
Not open for further replies.
Top