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

Need help in my Cam Sys.

Status
Not open for further replies.
Level 9
Joined
Mar 31, 2011
Messages
496
  • Cam Lock
    • Events
      • Unit - A unit enters SampleReg <gen>
      • Time - Every 0.03 seconds of game time
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Camera - Lock camera target for (Owner of (Entering unit)) to (Entering unit), offset by (0.00, 0.00) using Default rotation
      • -------- - --------
      • Camera - Set (Triggering player)'s camera Distance to target to 1000.00 over 0.10 seconds
      • Camera - Set (Triggering player)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set (Triggering player)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set (Triggering player)'s camera Rotation to (Facing of (Entering unit)) over 0.10 seconds
How can I make this thing work?

And Does it work for :eekani: 10 players?
 
  • Trigger
  • Events
    • Unit - A unit enters SampleReg <gen>
  • Conditions
    • ((Triggering unit) is a Hero) Equal to True
    • ((Triggering player) is in CameraGroup) Equal to False
  • Actions
    • Camera - Lock camera target for (Triggering player) to (Triggering unit), offset by (0.00, 0.00) using Default rotation
    • -------- - --------
    • Set Hero[(Player number of (Triggering player))] = (Triggering unit)
    • Player Group - Add (Triggering player) to CameraGroup
    • Trigger - Turn on Trig <gen>
  • Trig
  • Events
    • Time - Every 0.03 seconds
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of players in CameraGroup) Greater than 0
      • Then - Actions
        • Player Group - Pick every player in CameraGroup and do (Actions)
          • Loop - Actions
            • Camera - Set (Picked player)'s camera Distance to target to 1000.00 over 0.10 seconds
            • Camera - Set (Picked player)'s camera Angle of attack to 345.00 over 0.10 seconds
            • Camera - Set (Picked player)'s camera Height Offset to 100.00 over 0.10 seconds
            • Camera - Set (Picked player)'s camera Rotation to (Facing of Hero[(Player number of (Picked player)]) over 0.00 seconds
      • Else - Actions
        • Trigger - Turn off (This trigger)
  • Tri
  • Events
    • Unit - A unit leaves SampleReg <gen>
  • Conditions
    • ((Triggering unit) is a Hero) Equal to True
    • ((Triggering player) is in CameraGroup) Equal to True
  • Actions
    • Player Group - Remove (Triggering player) from CameraGroup
    • Camera - Reset camera for (Triggering player) to standard game-view over 2.00 seconds
I am using the boolean comparisons to check whether the player is already in the CameraGroup (which is a Player Group variable), to prevent the trigger from running again, when the unit is possibly moved via "Unit - Move unit" action, from another trigger.

Yes, it does work for every possible player. :]
 
Level 9
Joined
Mar 31, 2011
Messages
496
Thanks!

EDIT: But it doesn't not work :cry: will you put it in a sample map? then attach it here?
 
Last edited:
Level 9
Joined
Mar 31, 2011
Messages
496
I want all players to experience it. Not by typing anything, just when they enter a region.
So, anyone?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
EDIT: But it doesn't not work will you put it in a sample map? then attach it here?

Could you please describe this a little more? The answer that Pharoah_ gave you seems to be correct, so can you explain what exactly "doesn't work" or "doesn't happen"?
 
Level 9
Joined
Mar 31, 2011
Messages
496
Well, Pharoah_ did PM me, and said try to change Triggering unit to Owner of(Triggering Unit).

This one, The first trigger did work. but the others doesn't work. It just lock the camera on the unit entering the region.
 
Level 9
Joined
Mar 31, 2011
Messages
496
owh.... I see what's the problem when I created it. I used two events, and then when I deleted the other one it works, so, can you make me these? just the triggers, no maps.
 
Level 9
Joined
Mar 31, 2011
Messages
496
yeah... it's enough... I'll be changing, Unit - Leaves region to unit dies.

:) sample
 
Last edited:
Status
Not open for further replies.
Top