Camera issues...

serb7

New Member
Reaction score
1
how do i get it to where every X seconds of game time it retrieves a player position, and then if a unit casts X spell then the camera locks to last known player position?

when i cast this spell, it removes the unit and then places it and recreates the unit a bit ahead of where it removed it, so when a camera is locked on to the unit it resets itself back the spawn point of the unit....

edit: fixed :D THANK YOU SO MUCH FOR THE HELP!!
Trigger:
  • leap of faith
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Leap of Faith
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NormalCamera[1] Equal to False
          • (Triggering unit) Equal to Ninja 0001 <gen>
        • Then - Actions
          • Camera - Reset camera for Player 1 (Red) to standard game-view over 0.00 seconds
          • Set NormalCamera[1] = True
          • Wait 1.00 seconds
          • Camera - Apply Cam Follow <gen> for Player 1 (Red) over 0.00 seconds
          • Set NormalCamera[1] = False
        • Else - Actions
          • Do nothing
 

jig7c

Stop reading me...-statement
Reaction score
123
you have to save a point variable every x seconds, and then delete that variable after x seconds and set it to another location...

event
every 60 seconds...
condition
action
set point = position of some unit...
wait 60 seconds
remove location udg_point

event
a unit begins casting a spell
condition
ability being casted equal to XXX
action
move your camera to point!
 

HydraRancher

Truth begins in lies
Reaction score
197
It is:
Trigger:
  • Custom Script: call RemoveLocation (udg_point)


Its Case Sensetive!


Jig you do realise that is SUI?
(Single-Unit Instable (which is bad))
 

jig7c

Stop reading me...-statement
Reaction score
123
i know that Hydra... i was just pointing him in the right direction!
 

serb7

New Member
Reaction score
1
You could've atleast told him, this wont work for more than one unit.

i can make it work for more than one unit i would just need more variables and triggers :\

and conditions applying to certain players, i can figure it out
 

HydraRancher

Truth begins in lies
Reaction score
197
Or...
Trigger:
  • Initialization
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Hashtable - Create a Hashtable
      • Set CameraHashtable = (Last Created Hashtable)


Trigger:
  • Set Point
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = Units in (Playable Map Area)
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Point = (Position of (Picked Unit))
          • Hashtable - Add Temp_Point as 0 of (Key(Picked Unit)) in CameraHashtable
          • Custom Script: call RemoveLocation (udg_Temp_Point)
      • Custom Script: call DestroyGroup (udg_Temp_Group)


Trigger:
  • Ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Your Ability)
    • Actions
      • Set Temp_Point = Load Point of 0 of (Key(Triggering Unit))
      • Camera - Pan camera for (Owner of (Triggering Unit)) at Temp_Point
      • Custom Script: call RemoveLocation (udg_Temp_Point)


HASHTABLES!
 

serb7

New Member
Reaction score
1
Set Temp_Point = Load Point of 0 of (Key(Triggering Unit))

o_O? 'load point of 0'
what?
 

serb7

New Member
Reaction score
1
ok guys i did what both of you said and the problem is when i cast this spell, it removes the unit and then places it and recreates the unit a bit ahead of where it removed it, so when a camera is locked on to the unit it resets itself back the spawn point of the unit....
 
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