Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 3
Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/poll/poll_cookie.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 3
Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/poll/poll_cookie.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 3 .map :: Mapping for MoHAA
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 57
Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/leftindex.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 57
Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/leftindex.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 57
For this tutorial, I will assume you have
a working knowledge of MOHRadiant. This tutorial deal
with creating animated shutters, similar to those used
in m5l1a.
Right, I'll go right to the good stuff. First of all,
make your house. This isn't a house tutorial, so I'll
not get into details about making a house. Needness
to say, you are going to need some windows on it. For
this tutorial, I have created the front end of a house.
It has 4 windows, each in the same group number. you
will see a use for this later.
-------------------------------------------------------------------------------
Part 1 : Normal Movement
-------------------------------------------------------------------------------
Once you have your windows created, you want to create
shutters for those windows. To do this, just create
a very thin brush with a shutter texture such as (central_europe/shutter_set2).
The brush should be at the edge of the window coming
out away from the window, as in the picture below. You
need to have it at this angle for the animation to work
correctly, otherwise it will seem as though the shutter
goes into the wall as it moves. Make sure the edge of
the shutters join flush with the wall also, to give
the best effect.
Now the key part. We need to create a point of origin
for the window to move. Just like when creating a door.
The point of origin is created using the origin texture
from common textures. create a brush just inside the
edge of the window that touches the wall (this is the
same area of a hindge would be in reality). See the
image below for a better idea of what I'm talking about.
The blue rectangle is the shutter itself. The red rectangle
is the inner area, just inside the blue rectangle, that
is the point of origin.
Ok, we are almost there now. With the
shutter and its point of origin selected together, right
click on the edit area, on the shutter and select script/object.
This turns the whole object (point of origin and all)
into a scripted object for the shutter script to work
from. At this point, click "N" and enter a
key/value of targetname/lshutter, if it is the left
shutter otherwise a key/value of targetname/rshutter
if it is the right shutter. Finally, for the level editor
part of it. Enter a key/value of #group/1. Where 1 is
the group of these shutters currently being created.
It is a good idea to have a different group number for
each wall of windows.
Now for the script part. Don't worry, this is a lot
easier than my last tutorial. For this, it is simply
one line.
exec global/shutter.scr
Thats it. Each and every left shutter should be called
lshutter, and every right shutter should be called rshutter,
so they respond correctly. Put all this together with
a bit of rain, and you have a great effect. (sounds
and all)
-------------------------------------------------------------------------------
Part 2 : Slam the Shutters
-------------------------------------------------------------------------------
Ok, this part is easy. Its just a little extra something
you can play around with. It is simply a line of script
that works with the shutter.scr, script. It is used
in the game when a missle flys past the windows or there
is an explosion. Here is that little line:
thread global/shutter.scr::shuttrig
1
One last point of interest. The number "1"
at the end of that last line of script, is the group
number that we added earlier. As we numbered the group
1 earlier, then we add 1 at the end of this line of
script. simple huh? Thats it. You now had shutters blowing
in the wind, and you can stam them when you want.
The first section of code is basically the same as
before, the main difference is a loop, which is used
to step through each point of the camera view as it
travels along the path. Not to bad? Just read the code
and it should make enough sense for you to use it! Hey,
it works for me.
Final words. Well, this is a simple enough tutorial
when you know how, but it is just to make sure everyone
will know how its done. Best of all, it adds great atmosphere
to your levels.
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 219
Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/rightindex.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 219
Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/rightindex.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 219
Warning: require(): open_basedir restriction in effect. File(/home/map/cgi-bin/mohaa/poll/include/config.inc.php) is not within the allowed path(s): (/var/www/vhosts/own3mall/mohaaaa.co.uk:/usr/share/php:/usr/share/pear) in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 230
Warning: require(/home/map/cgi-bin/mohaa/poll/include/config.inc.php): failed to open stream: Operation not permitted in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 230
Fatal error: require(): Failed opening required '/home/map/cgi-bin/mohaa/poll/include/config.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/shutters.php on line 230