Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Camera cog
Camera cog
2002-12-18, 6:24 PM #1
I'm thinking of using a third person fixed Point of View for The Wrath of TiTo. Think Grim Fandango (it even uses the jk engine!) or Escape from Monkey Island.

Here's how I see it: You cross an adjoin(s), and the POV gets switched to a ghost position. You still control the player like normal. When you cross the opposite adjoin(s), you go back to the normal POV.

Is this possible?

[This message has been edited by GoZ_SpaceBoy (edited December 19, 2002).]
2002-12-18, 6:55 PM #2
Thats so rediculously easy, Ill write it blindfolded.

*ties blindfold*

Code:
# Resident Eval-esqe camera
#
#12/2002 GBK
Symbols
Message Crossed
Surface Adjoin0  LinkID=0
Surface Adjoin1  LinkID=1
Thing Cam
Thing Player   Local
End
Code
Crossed:
Player = JKgetlocalplayer();
Setcamerafocus(0, Cam[GetsenderID()]);
Stop;
End



That should work... 'Adjoin0' will set the view to the camera, and 'Adjoin1' will set it back to the player.
And when the moment is right, I'm gonna fly a kite.
2002-12-19, 2:11 PM #3
Very cool--that works great. [http://forums.massassi.net/html/smile.gif]

Let's say I wanted to set my entire level up with cameras. Could I just have a seperate cog for each camera, that specifies which adjoins activate it?

For instance, Camera 1 is activated if you cross adjoins a, b, or c. Camera 2 is activated if you cross adjoins d, e, or f.

Is it that simple? How would that cog look?
2002-12-19, 4:36 PM #4
Code:
# Resident Eval-esqe camera
#
#12/2002 GBK
Symbols
Message Crossed
Surface Cam_on0  LinkID=0
Surface Cam_on1  LinkID=0
Surface Cam_on2  LinkID=0
Surface Cam_on3  LinkID=0

Surface Cam_off0  LinkID=1
Surface Cam_off1  LinkID=1
Surface Cam_off2  LinkID=1
Surface Cam_off3  LinkID=1

Thing Cam
Thing Player   Local
End
Code
Crossed:
Player = JKgetlocalplayer();
Setcamerafocus(0, Cam[GetsenderID()]);
Stop;
End



There ya go. Basically the same thing, it just uses more adjoins. [http://forums.massassi.net/html/smile.gif] You can add as many adjoins as you need to a single cog. Just follow the above. Any adjoin with a linkID of 0 will activate the camera, and an linkID of 1 will deactivate it. You could have as any of these cogs in a level as you need. And heck, you dont even need ot use the 'off' adjoins. The camera ccould easily pass between one ghost and another, between one cog and another, without problems.
And when the moment is right, I'm gonna fly a kite.
2002-12-21, 7:20 AM #5
Ahh, cool. I thought it might have been something like that, thanks [http://forums.massassi.net/html/smile.gif]

2 more questions this time [http://forums.massassi.net/html/smile.gif]

How do I set it up so the level starts with a 3rd person camera? Right now it's first peson until I cross on of the adjoins...

Is there any way to disable the F1 chase-cam? I might actually keep it in the game for now, though...
2002-12-21, 8:39 AM #6
Ok, this cog will do bolth.

Code:
#12/2002 GBK
Symbols
Message Startup
Message Pulse
Thing Cam
Flex Rate=0.1   #How often it forces the view away from the chase-cam
End
Code
Startup:
Setcamerafocus(0, Cam);
Setpulse(Rate);
Stop;
Pulse:
If(Getcurrentcamera()) Setcurrentcamera(0);
Stop;
End


'Rate' will work as is, and 'Cam' is just the camera to switch to on startup.
And when the moment is right, I'm gonna fly a kite.
2002-12-21, 7:41 PM #7
Thanks again [http://forums.massassi.net/html/smile.gif]

Is there any way to stop the camera from going into "sleep mode" and automatically spinning around the player?
2002-12-22, 1:54 AM #8
Not that I know of. [http://forums.massassi.net/html/frown.gif]
And when the moment is right, I'm gonna fly a kite.
2002-12-23, 5:11 AM #9
Actually, SpaceBoy, I think that, for a more free-form exterior level such as yours, entering sectors as opposed to crossing adjoins might be the more prudent choice.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-12-23, 6:05 AM #10
Um, Grismath . . . consider this for a moment... In order to enter a sector, you must cross an adjoin...
And when the moment is right, I'm gonna fly a kite.
2002-12-23, 7:03 AM #11
Oh, wait, I just realized what you were saying. Hmm, that might be a good point...

Code:
# Resident Eval-esqe camera
#
#12/2002 GBK
Symbols
Message Entered
Sector Cam_on0 LinkID=0
Sector Cam_on1 LinkID=0
Sector Cam_on2 LinkID=0
Sector Cam_on3 LinkID=0

Sector Cam_off0 LinkID=1
Sector Cam_off1 LinkID=1
Sector Cam_off2 LinkID=1
Sector Cam_off3 LinkID=1

Thing Cam
Thing Player Local
End
Code
Entered:
Player = JKgetlocalplayer();
Setcamerafocus(0, Cam[GetsenderID()]);
Stop;
End



Virtually the same cog, just using Entered on sectors instead of Crossed on adjoins.
And when the moment is right, I'm gonna fly a kite.
2002-12-23, 2:54 PM #12
Indeed. I'm using a cog similar to that for one of my levels, I just didn't have it at my disposal at the time. :]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-12-24, 8:50 AM #13
Hey, thanks! [http://forums.massassi.net/html/smile.gif] That should make things a bit simpler, but I can also think of a few places where the adjoin version will come in handy, so I'll use both [http://forums.massassi.net/html/smile.gif]

Is there any other way to switch to a new camera, like walking on a 3do, or getting close to an object?
2002-12-24, 10:55 AM #14
Code:
# Resident Eval-esqe camera
#
#12/2002 GBK
Symbols
Message Entered
Thing Cam_on0 LinkID=0
Thing Cam_on1 LinkID=0
Thing Cam_on2 LinkID=0
Thing Cam_on3 LinkID=0

Thing Cam_off0 LinkID=1
Thing Cam_off1 LinkID=1
Thing Cam_off2 LinkID=1
Thing Cam_off3 LinkID=1

Thing Cam
Thing Player Local
End
Code
Entered:
Player = JKgetlocalplayer();
Setcamerafocus(0, Cam[GetsenderID()]);
Stop;
End



There ya go. Step on the things to activate/deatviate the cam.


Im in kind of a rush right now, so Ill write the distance controller later and post it.
And when the moment is right, I'm gonna fly a kite.
2002-12-28, 10:34 PM #15
Sorry about not responding sooner [http://forums.massassi.net/html/redface.gif]

Another big thanks--the 3do camera trigger thingy is going to really come in handy, as are the sector and adjoin camera trigger deals [http://forums.massassi.net/html/smile.gif]

Once I get back to texturing I'll (hopefully) have some spectacular showcase shots using your cogs...

[This message has been edited by GoZ_SpaceBoy (edited December 29, 2002).]

↑ Up to the top!