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

Manstie's TPCamera 1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This is a Third Person Camera, designed for my ORPG.

Why choose my Third Person Camera over others?
Unlike some cameras, my camera:
-Allows right-clicking on the minimap for long distance movements
-Allows Pinging on the minimap
-Stable throughout different heights in the terrain
-Has a unit-switching ability to change the camera from 1 to another unit
--Ontop of that, it has conditions for if the unit is able to be put onto camera
-Works for up to 12 players
-GUI Users Friendly

How to use:
-All you have to do is:
  • Unit Group - Add (Unit) to CameraGroup
Then for it to work, click on the unit that was added to the group in-game and it will start the camera.

Simple as that!

Code
JASS:
function Trig_SetCamera_Func001A takes nothing returns nothing
    if GetEnumUnit() == udg_ClickedUnit[GetPlayerId(GetOwningPlayer(GetEnumUnit()))+1] then
        set udg_CamPoint = GetUnitLoc(GetEnumUnit())
        set udg_CamHeight = GetLocationZ(udg_CamPoint)
        call SetCameraFieldForPlayer( GetOwningPlayer(GetEnumUnit()), CAMERA_FIELD_ZOFFSET, udg_CamHeight, 0.10 )
        call SetCameraFieldForPlayer( GetOwningPlayer(GetEnumUnit()), CAMERA_FIELD_TARGET_DISTANCE, 800.00, 0.10 )
        call SetCameraFieldForPlayer( GetOwningPlayer(GetEnumUnit()), CAMERA_FIELD_ANGLE_OF_ATTACK, 325.00, 0.10 )
        call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), udg_CamPoint, 0.10 )
        call SetCameraFieldForPlayer( GetOwningPlayer(GetEnumUnit()), CAMERA_FIELD_ROTATION, GetUnitFacing(GetEnumUnit()), 0.25 )
        call SetCameraFieldForPlayer(GetOwningPlayer(GetEnumUnit()),CAMERA_FIELD_ZOFFSET, GetCameraField(CAMERA_FIELD_ZOFFSET) + udg_CamHeight - GetCameraTargetPositionZ() + 75, 0.10)
        call RemoveLocation(udg_CamPoint)
    endif
endfunction

function Trig_SetCamera_Actions takes nothing returns nothing
    call ForGroup( udg_CameraGroup, function Trig_SetCamera_Func001A )
endfunction

//===========================================================================
function InitTrig_SetCamera takes nothing returns nothing
    set gg_trg_SetCamera = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_SetCamera, 0.02 )
    call TriggerAddAction( gg_trg_SetCamera, function Trig_SetCamera_Actions )
endfunction

  • Click Unit
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
      • Player - Player 11 (Dark Green) Selects a unit
      • Player - Player 12 (Brown) Selects a unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to (Triggering player)
      • ((Triggering unit) is in CameraGroup) Equal to True
    • Actions
      • Set ClickedUnit[(Player number of (Triggering player))] = (Triggering unit)
Changes: 1.1
Added a GUI trigger for those who can't get the JASS working.

Keywords:
Manstie, Camera, Third, Person, Cam.
Contents

Manstie's FPCamera v1.1 (Map)

Reviews
23:14, 18th Dec 2009 TriggerHappy: Review for Manstie's TPCamera This is far to simple and the Jass version is horrible converted GUI. Furthermore there are far better systems that do way more than this (I wouldn't call this a system...

Moderator

M

Moderator

23:14, 18th Dec 2009
TriggerHappy:


Review for Manstie's TPCamera

This is far to simple and the Jass version is horrible
converted GUI. Furthermore there are far better systems
that do way more than this (I wouldn't call this a system, more
of an example). And to top it all off, we do not need any more
TPC systems, we have like 5!

Status

Rejected
 
Level 12
Joined
May 21, 2009
Messages
994
nice but i think we got many camera systems here on the hive... But maybe you should change the function names to another instead of Func001A.
anyway it seems really user-friendly but its abit easy created ?
Anyway 3/5 for me.. :)
 
Level 8
Joined
Mar 3, 2009
Messages
327
oh nvm the enum unit thing.
lines 135 - 136 expected variable names.
lines 137 - 143 expected names
i did have the create unknown variables thing checked

off topic: google chrome > firefox > IE

oh and btw the script errors are when i paste into my map, not when i open yours.
this isnt supposed to be vJASS is it?
 
Level 12
Joined
Mar 10, 2008
Messages
869
Hmm... no not really...
Try disabling "Reinventing the Craft".

Plus, go download the newest JassHelper and replace it with the one in JNGS.

Try re-importing it into your map.

And just 1 thing that could affect it, but probably isn't it... are you using RoC?

If all else fails I'll give you a GUI version.
 
lol, i've even tried disabling EVERYTHING and getting the new jasshelper and it still doesn't work.

Can't go wrong with gui :p

Some Pc's just cant. Like mine. I cant compile (save) vJass, and yes i did try with different jasshelpers and versions and so on. Disabled everything. Didnt work.

Btw, nice system. But theres a big chance for it to get rejected like my system.
The message was "Theres allready 6 of these".
 
Level 12
Joined
Mar 10, 2008
Messages
869
This is way too simple to get approved, also I'm pretty sure it doesn't work on bridges. (Although I didn't test it)
It does, I'm using it on my RPG and it has a (BIG) bridge, and it works on that.

So much systems that already exist...

Why not do us a favor and make something interesting? :p

No offense, this isn't pointed at you but there are already several systems like this one, why did you made another one? :p
Because its the best one for newbs, its not complex at all, and easy to use.
You can see the result:
At long last a camera that works !!! 5/5
 
Top