Forum

ASSIST, AMERICA'S ARMY COMMUNITY - RELIVE THE GLORY DAYS OF AMERICA'S ARMY 2.5

Author Topic: [Tutorial] Security Camera  (Read 940 times)

0 Members and 1 Guest are viewing this topic.

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
[Tutorial] Security Camera
« on: Sunday, June 03, 2012, 19:58:28 PM »
Copied from AngelMapper for Max just in case her website goes down.
http://www.angelmapper.com/gamedev/tutorials/securitycamera.htm



If you have played DM-Insidious then you probably saw the two television screens above the body in the glass tube and wondered, "How did they do that"? In this tutorial I will show you how to make a simple version of the television screen that you can use in your own levels.

Open the editor and create a room large enough to experiment in. For our television screen, make a 128 unit cube against one of the walls and rotate it towards the center so we'll be able to see it easier. The textures you use do not matter at this point. We need something for our camera to look at, so open the actor browser and add an xWeaponBase at the far end of the room and set it to Rocket Launcher. You should now have something that looks like this:




Now to add our camera and television. Add an Info >> CameraTextureClient to the level. This actor takes whatever our camera sees and turns it into a texture so we can display it. For the camera, we simply add an emitter. Open it's properties and set Advanced >> bDirectional to True. Now it displays an arrow we can use to aim it. Set it high in the room and aim it at the xWeaponBase.




Now we have to create a texture for the engine to use as our screen. Open the texture browser and hit File >> New. Set the Package name to MyLevel (this makes it so we don't have to include another file with the level), leave Group blank, and set its Name to Television. Be sure its Class is at the default, Raw Material. In the Material Class scroll box, find Scripted Texture, then hit New to create our screen texture.



Now a new window pops up with our new texture's properties. Set its UClamp and VClamp values to 256. Now, without closing the window, open the texture browser and highlight Engine >> DefaultTexture. Go back to our texture's properties and hit the Use button in the FallbackMaterial box. It should now say Texture'Engine.DefaultTexture' and you should see it displayed in the upper left corner of the window.



Now close out our texture's property box, and highlight it in the MyLevel package in the texture browser. Apply it to the front of our television screen and align it properly:



Only a few things left! Open the CameraTextureClient's properties and open the CameraTextureClient tab. Hit the Use button next to DestTexture and our texture's name should appear in the box. Set its CameraTag to TVScreen1. Go into the Emitter's properties and set its Event >> Tag to TVScreen1 as well.





Congratulations, if you have followed these instructions you have a working television screen. Don't forget to add a player start, then go in and check it out. The TV should display the rocket launcher spinning in its base. Note that if you aim it in other directions you can see other players and bots but not yourself. This texture can be placed on meshes as well. To get an effect similar to DM-Insidious, open the Mesh pack AbaddonHardware and add a Screen01AB to your level. Open its Display properties and click the Add button next to Skins. Highlight our custom texture in the texture browser and hit Use in the
  • box below Skins. The monitor should now have our custom texture in place of the screen.


In addition, if you know how to use Movers you can set one up that rotates back and forth, then set its Tag to CameraMover1, then set the Emitter's Movement >> AttachTag to CameraMover1. The camera will then rotate back and forth like some are designed to do.






Maabus from the Atari forums has also come up with a solution to getting the cameras to work online. In the Actor browser, right click on the CameraTextureClient and hit New. Give it a name, and set the Package to mylevel. Hit OK and a new window will pop up. Hit the Compile Changed Scripts button (three sheets of paper), then once it's done, close out that window. In the Command line at the bottom of UEd, type editdefault class=mycameratextureclient, or whatever name you gave it. This will pop up the default property window for it. Under None, look for RemoteRole, and change it to ROLE_SimulatedProxy. Close it out, then use this class instead of the normal CameraTextureClient and it will work online. You may have to uncheck Placeable Classes Only in the Actor browser to get it to show up.

Good luck!
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline Maxbulldog_53

Re: [Tutorial] Security Camera
« Reply #1 on: Sunday, June 03, 2012, 20:00:55 PM »
awesome. Thanks ;D
I need teepee for my bunghole!

Xfire----maxifymecaptain

http://img251.imageshack.us/img251/1696/mouseyo.gif[/img]

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: [Tutorial] Security Camera
« Reply #2 on: Sunday, June 03, 2012, 20:15:28 PM »
No problem :) I hope you get yours working.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline Maxbulldog_53

Re: [Tutorial] Security Camera
« Reply #3 on: Monday, June 04, 2012, 08:40:00 AM »
for the life of me i cant get these to work in my map for some reason.
« Last Edit: Monday, June 04, 2012, 23:46:13 PM by Maxbulldog_53 »
I need teepee for my bunghole!

Xfire----maxifymecaptain

http://img251.imageshack.us/img251/1696/mouseyo.gif[/img]

 

Download Assist

×

Download Game Client

Important: Battletracker no longer exists. However, old Battletracker accounts may still work. You can create a new 25Assist account here

Download Server Manager