HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Camera Problems

06-05-2008, 02:39 AM#1
Phish-Paste
Hiya~

I have this camera script for my map(below) and was wondering if anyone would know why it would cause my game to lock up. When I say lock up, I mean you can't move any of your units until you click something, then issue a command.

I know this is multi-player oriented, since the thing works fine in single player testing.

I thought about maybe it was because it has something to do with the cameras, but I'm unsure of that too. So here I am asking for help.

If anyone can help, I'd love it. Thanks in advance.

Trigger:
Camera
Collapse Events
Time - Every 0.10 seconds of game time
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Player((Integer A))) is in Camera_Group) Equal to True
Zoomed[(Player number of (Picked player))] Equal to False
Collapse Then - Actions
Set Unit_Pan_Location[(Player number of (Player((Integer A))))] = (Position of Unit_Camera_Lock[(Player number of (Player((Integer A))))])
Camera - Pan camera for Player_Camera_Bond[(Player number of (Player((Integer A))))] to Unit_Pan_Location[(Player number of (Player((Integer A))))] over 1.35 seconds
Camera - Set (Player((Integer A)))'s camera Rotation to (Facing of Unit_Camera_Lock[(Player number of (Player((Integer A))))]) over 1.35 seconds
Camera - Set Player_Camera_Bond[(Player number of (Player((Integer A))))]'s camera Distance to target to 525.00 over 0.40 seconds
Camera - Set Player_Camera_Bond[(Player number of (Player((Integer A))))]'s camera Angle of attack to 330.00 over 0.40 seconds
Camera - Set Player_Camera_Bond[(Player number of (Player((Integer A))))]'s camera Field of view to 120.00 over 0.40 seconds
Camera - Set Player_Camera_Bond[(Player number of (Player((Integer A))))]'s camera Height Offset to 175.00 over 0.40 seconds
Custom script: call RemoveLocation(udg_Unit_Pan_Location[GetConvertedPlayerId(ConvertedPlayer(GetForLoopIndexA()))])
Collapse Else - Actions
Set Unit_Pan_Location[(Player number of (Player((Integer A))))] = (Position of Unit_Camera_Lock[(Player number of (Player((Integer A))))])
Camera - Lock camera target for (Player((Integer A))) to Unit_Camera_Lock[(Player number of (Player((Integer A))))], offset by (0.00, 0.00) using The unit's rotation
Camera - Set (Player((Integer A)))'s camera Rotation to (Facing of Unit_Camera_Lock[(Player number of (Player((Integer A))))]) over 0.10 seconds
Camera - Set Player_Camera_Bond[(Player number of (Player((Integer A))))]'s camera Distance to target to 0.00 over 0.40 seconds
Camera - Set Player_Camera_Bond[(Player number of (Player((Integer A))))]'s camera Angle of attack to Snipe_Angle[(Player number of (Picked player))] over 0.40 seconds
Camera - Set Player_Camera_Bond[(Player number of (Player((Integer A))))]'s camera Field of view to 0.00 over 0.40 seconds
Camera - Set Player_Camera_Bond[(Player number of (Player((Integer A))))]'s camera Height Offset to 175.00 over 0.40 seconds
Custom script: call RemoveLocation(udg_Unit_Pan_Location[GetConvertedPlayerId(ConvertedPlayer(GetForLoopIndexA()))])
06-05-2008, 06:44 AM#2
Pyrogasm
This wouldn't cause a lock-up, but I think this is an error:
Trigger:
Zoomed[(Player number of (Picked player))] Equal to False
Collapse ------- Should be: -------
Zoomed[(Integer A)] Equal to False
Also, every instance you have of "(Player number of (Player((Integer A))))" could just be replaced with "(Integer A)". And in those JASS lines: call RemoveLocation(udg_Unit_Pan_Location[bj_forLoopAIndex])
06-05-2008, 11:03 PM#3
Phish-Paste
I have another question.
Is there anyway to reset a camera without having to use the [Camera - Reset Camera] function? Maybe if I some how clean up the queue of all the trigger fires, it'll stop seizing.

I know for sure it's the camera now that causes this. Maybe it's because my script isn't JASS, it's firing too slowly for it to work with up to 12 players?
06-07-2008, 09:01 PM#4
Pyrogasm
That's the only way to reset the camera. And your script wouldn't run slowly just because it's not directly JASS.