MBolus@Posted: Tue Sep 28, 2004 9:48 pm :
MBolus Tutorial: Monster Cam!


Image
You are a fine demon, and you can't help but check yourself in the mirror on the way to destiny.

Welcome to my tutorial, which as far as I know is the first to discuss the Monster Cam! This is very simple, and I discovered this while working on my Monsters on the Walls tutorials. I was working on different camera effects, including an interesting zooming teleporter effect, and this also came about. You can effectively strap cameras to monsters, to walk in their moccasins and feel like a monster, or to use their special perspective in general. Many of you will enjoy this one! If there is enough interest I can post the map within the next week or so, but the following text should suffice for most of you.

Although I have found multiple excellent methods, I will explain a simple one:

1. Make your map and decide which monsters will be mounted with viewcameras.

2. Around the area of the monster's viewpoint, right click on your map and set a func_cameraview which you can name func_cameraview_imp_1 .

3. Bind the func_cameraview to the monster (with a key/val pair).

4. Decide what will trigger the effect. For this discussion, let's say you simply decide to right click on your map and set a trigger_once where you want to trigger a func_cameraview.

5. Press n to edit the trigger's entity info. In its entity window, set up a key/val pair of call/cam_imp_start_1 . The scripting code for this will be described below.

6. Remember that entities that you want to view (e.g., other monsters) should have a key/val pair of cinematic/1 (except e.g. for worldspawn, which is already treated as having that designation).

7. Save your map, and bsp it however you like.

8. Type the following script in Notepad or whatever, and save it with the same name as your map, except change the extension to .script instead of .map . For example, if your map is MBolusMonsters01a.map, save the script as MBolusMonsters01a.script . (You may have to rename it afterward, if your desired editor tries to call it Blahblah.txt).

Code:
void cam_imp_start_1()
{
sys.setCamera($func_cameraview_imp_1);      //sets the view to this camera; works great!
sys.wait(10);                               //how many seconds do you want to enjoy the view from the monster cam?
sys.firstPerson();                          //res ipsa loquitur; return to first person view
}


9. There are many other factors to consider, but this will get most of you started in the right direction to enjoy the Monster Cam!

Cheers!

P.S. My Monsters on the Walls Part 2 will be appearing on Doom3World.org in October 2004. In the meantime, here's the viewpoint from a typical monster on the wall! Stay tuned . . .

Image



Immortal@Posted: Tue Sep 28, 2004 10:52 pm :
Thanks For that :)



BNA!@Posted: Tue Sep 28, 2004 10:53 pm :
Nice one!



indianajonesilm@Posted: Tue Sep 28, 2004 10:57 pm :
This is awesome, Thanks MBolus! I can use this for some scary cut scenes right before you get attacked! Muahahaahaa! :twisted:



MBolus@Posted: Wed Sep 29, 2004 5:23 am :
I thought you might also be interested to know that through experimentation with a target_null which is appropriately placed and targeted by the Monster Cam's func_cameraview, you can get a creepy view of the monster's claws as the viewer's hands:
Image
For this image, I placed the target_null at waist level and off to the side about 30 degrees or so.



Enforcer@Posted: Thu Sep 30, 2004 12:11 am :
I've had a problem with mine i created the monster, cam, trigger, and some mon paths for the mon to follow but the camera doesnt seem to want to look thru the monsters eye's or follow it



MBolus@Posted: Thu Sep 30, 2004 1:55 am :
Enforcer wrote:
I've had a problem with mine i created the monster, cam, trigger, and some mon paths for the mon to follow but the camera doesnt seem to want to look thru the monsters eye's or follow it

Okay, running through some of the checklist above, and making the assumption that you made no typing errors:
In the func_cameraview entity, did you enter a key of bind with a val of the monster's specific name (not classname or other reference)?
Does the specific name of the func_cameraview match the $func_cameraview... in the sys.setCamera function of the script?
Did you set up a file named e.g. myfile.script in the same folder where you have myfile.map, and e.g. in the trigger_once entity did you set a key of call with a val of cam_imp_start_1 which is the name of the function within myfile.script?
Did you make sure that essentially all of the entities, as well as those you want to view, each have a key of cinematic with a val of 1, including funcs and monsters to be sure?

I have gotten this to work with multiple different entities without problems. Is anything complex going on in your map? Is it in the middle where nothing else like a teleporter would be configured to fight for the view? Any strange key / val pairs set on your particular monster? Do any errors show up on your console? Consider trying again from scratch in case something messed up, e.g. trigger or monster malfunction or misnamed files or entries. Let me know how it goes.



Lionclaw@Posted: Mon Oct 25, 2004 6:43 pm :
I'm getting this warning, what do i do?

during graveyard/graveyard...
WARNING: trigger 'trigger_once' at (208 136 -48 ) calls unknown function 'cam_imp_start_1'
1 warnings



MBolus@Posted: Tue Oct 26, 2004 12:58 am :
Lionclaw wrote:
I'm getting this warning, what do i do?
during graveyard/graveyard...
WARNING: trigger 'trigger_once' at (208 136 -48 ) calls unknown function 'cam_imp_start_1' 1 warnings


If you follow the tutorial as above (see my 9/29/04 note to Enforcer for simple details), it should work. Importantly, your .script file's function is not being recognized properly.

I'm not sure how experienced you are with .script files, so I will start from a few early steps. In Doom 3, a common way to use your custom .script file is samename, so your .script file has the same filename as your .map (other than filename extensions), and they reside in the same directory. So if you typed the file exactly as above (in the Code box) and called it graveyard.script (assuming your map is graveyard.map), and placed both of those files in the same directory, it should work.

If this doesn't resolve it, then in case you might have made a typo, rename your .script file as a backup, and retype another from scratch. Then go through the other steps. It may seem tedious, but it is worth the experience and result. If it still doesn't work, I can help with more details. If you already know all of this, maybe you can just post a copy of at least your .script file here, for additional help. Let me know...



Lionclaw@Posted: Tue Oct 26, 2004 3:06 pm :
if you give me you'r E-mail, thene i can send you a test map i made (and it doesn't work)



The Rogue Wolf@Posted: Wed Oct 27, 2004 12:34 am :
Lionclaw wrote:
I'm getting this warning, what do i do?

during graveyard/graveyard...
WARNING: trigger 'trigger_once' at (208 136 -48 ) calls unknown function 'cam_imp_start_1'
1 warnings

Simple question time... are you sure you're not accidentally saving the script with a .txt extension? It's happened to me more than a few times already.



MBolus@Posted: Wed Oct 27, 2004 2:04 am :
The Rogue Wolf wrote:
Simple question time... are you sure you're not accidentally saving the script with a .txt extension? It's happened to me more than a few times already.

Yes, that can definitely happen, although following step #8 above would fix that (of course, it's important to be sure that file extensions are not hidden). I left a PM for Lionclaw to either post a small .map file and .script in small font like 6 point for all of us to look at, or else email it to me to work on as I get time. There are many ways to make errors, but fortunately we can help fix them.



Lionclaw@Posted: Wed Oct 27, 2004 2:58 pm :
Okay i have sendt the test map to you MBolus



Lionclaw@Posted: Wed Oct 27, 2004 3:12 pm :
thanks to you I know whats wrong! the extension file was txt after all! :oops: . thanks for the help everyone :) and the tortural was great :D



easy@Posted: Wed Oct 27, 2004 3:13 pm :
I think you just have to add a number after the mapname (scriptname too, of course). so name it for example: graveyard01.map and graveyard01.script

don't ask why... we discussed this problem on doom3maps.de, too and didn't get to an satisfying answer.
but the workaround above should eliminate your problem :wink:

hope i could help

kind regards

btw: great tut!

EDIT: examples inserted
EDIT2: uuuhhh, someone was faster :?
the filenames without the numbers worked in that case?



MBolus@Posted: Thu Oct 28, 2004 1:08 am :
easy wrote:
btw: great tut!

Lionclaw wrote:
thanks to you I know whats wrong! the extension file was txt after all! :oops: . thanks for the help everyone :) and the tortural was great :D

Thanks, and you're welcome!

But you're still not done yet. Although you are able to recognize your .script file now, you still have to be sure that the function call from your trigger matches that in your script. I just received your map, and your trigger is printed below:

Code:
"classname" "trigger_once"
"name" "trigger_once_1"
"model" "trigger_once_1"
"origin" "96 112 -32"
"call" "func_cameraveiw_imp_1"
"target" "func_cameraview_imp_1"

On the "call" line, you have to change "func_cameraveiw_imp_1" (which is spelled incorrectly anyway) to "cam_imp_start_1" (which is the name of the function that you are calling). Once you fix that, you will truly call the function; otherwise you won't get back to first person view after the sys.wait time (10 seconds in this case).

For another example of my Monster Cam being used for 4 seconds in the middle of a map, consider checking my demo map that illustrates how to make monsters walk on ceilings and walls. You can download the file containing the .map, .script, and .def files from either of the sites listed below:
http://www.doomcentral.net/hosted/MBMonsWallPart2.rar
http://www.mnemic.tk/education/writtent ... lPart2.rar
Just unrar the file into your base directory within your Doom 3 directory; this should place the custom .def file into the def subdirectory, and the .map and .script into the maps subdirectory. (If you want everything to be in a directory parallel to base, go for it, especially as the 1.1 patch doesn't like a lot of stuff in base. Also, you could just edit the mutant monsters in the maps to nonmutant types if you don't want any extra .def files at all.)

If you are interested, the tutorial itself is:
http://www.doom3world.org/phpbb2/viewtopic.php?t=6853
It is more advanced than the above, but you could always just check out the map for now.



pbmax@Posted: Mon Feb 14, 2005 7:14 pm :
this is a neat effect and i was wondering whether or not people are incorporating it in thier mods.

for example, lets say the camera switches to the monster cam and shows a boss monster crawling on the ground through the area you moved through a several minutes ago. it seems to be following you!

this keeps happening from time to time. and each time the monster is getting a little closer and closer until its in the room right behind you!

could be a cool way to increase the suspense and tension...