HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

help (arrow keys, camera objects, letterbox mode)

07-25-2007, 05:11 AM#1
fps-doug
Hey you guys, I come to you guys with a big problem that has stumped me all day (and now I need to sleep soon.. ).

well first if anyone is interested Ive started remaking my bomberman map from the ground up (when I tried my first multiplayer playtest from the 1st version the entire thing imploded) and so far ive already overcome obstacles over my 1st version.

In the beginning of the map, you can choose a model for your character. The different units dont impact gameplay, its just a choice so people dont end up either with all the same character, or random characters that they may not like the look of. So basically my intent is that you use the left and arrow keys to move forward and back through the currently 11 different selectable units.

Each character has their own little 'scene', if you've played WoW you know what I mean, in WoW each race has their own little backdrop in the character select screen. Well mine is basically the same, and I have a preplaced camera object for each 'scene'. So you push the left or right arrow and the next or previous camera object is applied. Simple right? Well theres some problems that I've run into trying to get this to work.

1. pushing an arrow key applies the next camera object, but since you're also moving your game camera to the side, its almost simultaneously cancelling the camera object (even though I apply without panning over 0 seconds)

2. I put the game in letterbox mode to keep the camera moving only as intended, but now apparently using the arrow keys no longer register as 'pressed' when you're in letterbox mode.


So what do I do?? Currently what Im looking at is doing is creating custom abilities that look like forward/back arrows, and giving these abilities to a unit thats always selected in order to browse through the charcters. However I cant do this in letterbox mode (because the control panel would be gone), and if I do it in normal mode, the player can still move the arrow keys or just move the mouse cursor to scroll the camera.

So what Im trying to do is stop the player from being able to mess with the game camera, and if possible use the arrow keys for browsing. Arrow keys arent necessary, abilities and whatnot would be totally fine too...

Also, the camera objects arent focused on the unit of each scene. Even when they were, 'lock camera orientation to unit' seemed to flub up the camera somehow. I just want the camera object to be applied, then lock the camera in place so it cant be scrolled, and also so that you cant change the angle with the mouse wheel... I hope that is not too much to ask .
07-25-2007, 06:09 AM#2
Strilanc
What you can do is constantly pan the camera to the selection with a small delay. So, for example, every .1s you pan to the selection with a delay of .2s. This will keep them "locked" to that camera, isn't breakable with ctrl+c, and generally looks good.
07-25-2007, 06:16 AM#3
Dil999
Holy shizzit, im making a bomberman map too o.O
You could also have a 'selector' unit, which has 2 abilities, go left and go right. Then, detect when a unit uses go left or go right, and move the camera.
07-25-2007, 07:15 AM#4
Ammorth
I believe enabling the player's control (can't remember the exact action) allows the arrow keys to be pressed. This would (I think) allow the player to scroll with the arrow keys, which brings you down to step one.

What I would do is have a unit for each scene that is not the selected unit, but a dummy unit. Give it no movement, pathing, model, and give it locust. Then all you do is when the player presses the direction, lock the camera to the next unit. When you are done selecting, use the reset camera function.
07-25-2007, 03:33 PM#5
fps-doug
okay thanks guys, what I tried first was enable/disable user control. Disable user control makes it so the arrow keys dont get registered either, and if I enable it in letterbox mode, its the same as normal (I can pan the camera around and stuff).

So what I ended up doing was at map init, create a dummy at the target of each camera object (because each camera object is setup individually and has its own angles/fov/distance/etc. and before I apply each camera object (when you push left or right arrow) I lock the camera to the target first, then apply the object and it works perfect. It was funny because I forgot to take away the dummy model and each scene had a mysterious zombie in the backdrop lol. thanks guys