- Joined
- Jul 24, 2007
- Messages
- 308
Here is a trigger to make camera as sniper with crosshair [like a system somewhere here] , the bug is when i zoom in i see the crosshair but camera stays on its place .. while it should be infront of the unit , the thing make me mad is that the zoom works ONLY for red player.! and dont worry about filters they r peacfuly don .
i tried to enable it on multiplayer but i just failed. whats wrong? i looked for mistake or leak but i never found. why ?
i tried to enable it on multiplayer but i just failed. whats wrong? i looked for mistake or leak but i never found. why ?
-
Player Camera
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Zoomed[(Player number of (Player((Integer A))))] Equal to True
-
Then - Actions
- Camera - Lock camera target for (Owner of PlayerUnits[(Integer A)]) to PlayerUnits[(Player number of (Player((Integer A))))], offset by (0.00, 0.00) using The unit's rotation
- Camera - Pan camera for (Owner of PlayerUnits[(Integer A)]) to ((Position of PlayerUnits[(Integer A)]) offset by 100.00 towards (Facing of PlayerUnits[(Integer A)]) degrees) over 0.25 seconds
- Camera - Set (Owner of PlayerUnits[(Integer A)])'s camera Distance to target to 0.00 over 0.00 seconds
- Camera - Set (Owner of PlayerUnits[(Integer A)])'s camera Field of view to 20.00 over 1.00 seconds
- Camera - Set (Owner of PlayerUnits[(Integer A)])'s camera Rotation to (Facing of PlayerUnits[(Integer A)]) over 0.25 seconds
- Camera - Set (Owner of PlayerUnits[(Integer A)])'s camera Height Offset to 100.00 over 0.00 seconds
- Camera - Set (Owner of PlayerUnits[(Integer A)])'s camera Angle of attack to 360.00 over 0.00 seconds
- Camera - Set (Owner of PlayerUnits[(Integer A)])'s camera Far Z to 1000000000.00 over 0.00 seconds
- Set ZoomedPosition[(Player number of (Player((Integer A))))] = (Position of PlayerUnits[(Integer A)])
- Visibility - Destroy VisibilityZoom[(Player number of (Owner of PlayerUnits[(Integer A)]))]
- Visibility - Create an initially Enabled visibility modifier for (Owner of PlayerUnits[(Integer A)]) emitting Visibility from ZoomedPosition[(Player number of (Player((Integer A))))] to a radius of 5000.00
- Set VisibilityZoom[(Player number of (Owner of PlayerUnits[(Player number of (Player((Integer A))))]))] = (Last created visibility modifier)
- Custom script: call RemoveLocation(udg_ZoomedPosition[GetConvertedPlayerId(ConvertedPlayer(GetForLoopIndexA()))])
-
Else - Actions
- Do Nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Events
-
Sniper Zoom
-
Events
- Unit - A unit Starts the effect of an ability
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Zoom In
-
Then - Actions
- Custom script: call CinematicFilterGenericForPlayer(GetOwningPlayer( GetSpellAbilityUnit( ) ), 2.0, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\Sniper Rifle Scope", 100.0, 100.0, 100.0, 0.0, 100.0, 100.0, 100.0, 0.0 )
- Unit - Add Zoom Out to (Casting unit)
- Unit - Remove (Ability being cast) from (Casting unit)
- Unit - Set (Casting unit) movement speed to 1.00
- Set Zoomed[(Player number of (Owner of (Casting unit)))] = True
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Zoom Out
-
Then - Actions
- Custom script: call CinematicFilterGenericForPlayer(GetOwningPlayer( GetSpellAbilityUnit( ) ), 2.0, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0 )
- Unit - Add Zoom In to (Casting unit)
- Unit - Remove (Ability being cast) from (Casting unit)
- Unit - Set (Casting unit) movement speed to (Default movement speed of (Casting unit))
- Set Zoomed[(Player number of (Owner of (Casting unit)))] = False
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Last edited by a moderator: