Following Camera Problem

swe_suffer

New Member
Reaction score
20
Problem: The camera doesnt change the hight when the unit walk up on a cliff so the camera get stuck in the cliff.

Code:
Events: Time - Every 0.10 seconds of game time   
Conditions: -   
Actions: Pick every units in ( Units in (playable map area) owned by Player 1(Red)) and do (Actions)
  Loop - Actions 
Camera - Pan Camera for Player 1 (Red) to (Position of Picked Unit)) over 0.10
Camera - Set Player 1 (Red)'s camera Distance to target to 300.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Far Z to 10000.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Angle of attack to 337.50 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Field of view to 90.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Roll to 0.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Rotation to (Facing of (Picked unit)) over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Height Offset to ((Current flying height of (Picked unit)) + 96.00) over 0.10 seconds

So i wonder how i should do to make the camera go up when the unit goes up on a cliff.
I whould be glad if some1 answere.

Sorry about my bad English
 
Reaction score
149
Code:
Actions: Pick every units in ( Units in (playable map area) owned by Player 1(Red)) and do (Actions)
This is a memory leak. Each picked unit adds up 32 kb of space, and when trigger is ran every 0,1 seconds, thsi really add up.
do a code like

Code:
set tempGroup = ( Units in (playable map area) owned by Player 1(Red))
Actions: Pick every units in tempGroup and do (Actions)
  Loop - Actions 
  Camera - Pan Camera for Player 1 (Red) to (Position of Picked Unit)) over 0.10
  Camera - Set Player 1 (Red)'s camera Distance to target to 300.00 over 0.10 seconds
  Camera - Set Player 1 (Red)'s camera Far Z to 10000.00 over 0.10 seconds
  Camera - Set Player 1 (Red)'s camera Angle of attack to 337.50 over 0.10 seconds
  Camera - Set Player 1 (Red)'s camera Field of view to 90.00 over 0.10 seconds
  Camera - Set Player 1 (Red)'s camera Roll to 0.00 over 0.10 seconds
  Camera - Set Player 1 (Red)'s camera Rotation to (Facing of (Picked unit)) over 0.10 seconds
  Camera - Set Player 1 (Red)'s camera Height Offset to ((Current flying height of (Picked unit)) + 96.00) over 0.10 seconds
Custom script:   call DestroyGroup (udg_tempGroup)

Also,
Code:
 Camera - Set Player 1 (Red)'s camera Height Offset to ((Current flying height of (Picked unit)) + 96.00) over 0.10 seconds
This one doesn't look too good. Is unit movement type flying? If no, just try removing this line. I think camera automatically changes height then.
 

Chocobo

White-Flower
Reaction score
409
This is a memory leak. Each picked unit adds up 32 kb of space, and when trigger is ran every 0,1 seconds, thsi really add up.
do a code like

Yes, "Only" the Unit Allocated Number takes 32 kb (Range of 000000 to 999999). In reality, it takes really more space than that for all datas.

Code:
Events: Time - Every 0.10 seconds of game time   
Conditions: -   
[B]Custom Script: set bj_wantDestroyGroup = true[/B] //This is enough to clean ForGroup Actions
Actions: Pick every units in ( Units in (playable map area) owned by Player 1(Red)) and do (Actions)
  Loop - Actions 
  [B]Set loc = (Position of (Picked Unit))[/B] //This against leaks, it is a Point/Location Variable
Camera - Pan Camera for Player 1 (Red) to [B]loc[/B] over 0.10
Camera - Set Player 1 (Red)'s camera Distance to target to 300.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Far Z to 10000.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Angle of attack to 337.50 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Field of view to 90.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Roll to 0.00 over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Rotation to (Facing of (Picked unit)) over 0.10 seconds
Camera - Set Player 1 (Red)'s camera Height Offset to ((Current flying height of (Picked unit)) + 96.00) over 0.10 seconds
 

swe_suffer

New Member
Reaction score
20
it isnt a flying but the cliffs is made with the raise tool.
Ill see if your version works better.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top