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/adding_objectives.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/adding_objectives.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/adding_objectives.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/adding_objectives.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/adding_objectives.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/adding_objectives.php on line 57
Adding Objectives :: AL
-------------------------------------------------------------------------------
Okay you know how to build a map put
in a light and a starting position what we need now
are events , objectives and usable objects (maybe a
sound effect or a door or maybe a ladder). In this section
we shall be picking up the pace, so get yer thinking
caps ready.
Right lets start by making a room
make it 1024 x 512 x 512 (don't forget to set your grid
to 32, use caulk). Right you built it don't use
any other texture yet apart from caulk (good work practice).
Good, lets continue.
Half way into your room place a wall
that reaches from floor to ceiling (make sure u have
a doorway in the dividing wall 128 x 64). In each side
place a light in the left hand side of your room place
your info_playerstart.
Next make a door brush (32x64x128)
place this in the doorway. With the door brush still
selected press the n key (n = entity). Find the func_door
and double-click it.The brush is now a door. See its
angle box click it the up direction, also tick the auto
open tab. In the right hand room make another brush
as wide as room and as high (32x448x448) and place it
halfway into this room. Find the common->trigger
texture and apply to this brush.
Then while it is still selected press
the n key select trigger_multiple (double click). Give
it a key setthread give it a value objective1. (This
will trigger our objective within the script as you
will soon learn).
Right deselect and place a script_origin
near the trigger give it a key $targetname give it a
value obj1 (This entity will give the direction for
our in game compass for objective direction)
Ok now texture your wall surfaces
using ctrl + shift + left mouse to select, and ctrl
+ shift + 3rdmouse to apply. Find an appropriate door
texture and texture the door. You will see that the
texture doesn't fit properly. Select the 2 faces of
the door (ctrl + shift and left click) and press s.
This brings up the surface properties. Use horizontal
/ vertical scale to alter the size of the texture until
it fits the door (I use 0.5 / 0.5 on my doors - Surgeon).
You can use Vertical / Horizontal shift to move the
texture around the face of the brush.
Once you've done all this you are
nearly ready to compile but not just yet save this map
as test_xx.
Now back to Notepad .. make a
new script name it test_xx.scr and add the following
// Dudes MAP
// ARCHITECTURE: AL
// SCRIPTING: AL
exec global/ai.scr
exec global/loadout.scr maps/test_xx.scr
main:
level waittill prespawn
exec global/ambient.scr test_xx
level waittill spawn
$player item weapons/colt45.tik
fadein 2 0 0 0 1
wait 2
level.script = "maps/test_xx.scr"
thread objectives
thread music1
end
objectives:
waitthread global/objectives.scr::add_objectives
1 2 "walk through the door and beyond."
$obj1.origin
set_objective_pos $obj1
end
music1:
$player stufftext "tmstart sound/music/mus_04f_suspense.mp3"
end
objective1:
goto levelend
end
levelend:
waitthread global/objectives.scr::add_objectives
1 3 "walk through the door and beyond."
$obj1.origin
waitthread global/objectives.scr::current_objectives
0
exec global/missioncomplete.scr test_xx 1
end
Right here is an explination for the
above code (I hope this helps explains what is what
and how it is used)
exec global/ai.scr //
enables the game ai
exec global/loadout.scr maps/test_xx.scr //
enables the script
level waittill prespawn //
wait till loaded before spawning level
exec global/ambient.scr test_xx //
enables ambient sound
level waittill spawn
$player item weapons/colt45.tik //
gives you a gun
fadein 2 0 0 0 1 // fades
in the level
wait 2 // wait
level.script = "maps/test_xx.scr"
thread objectives // this
adds your objectives defined below
thread music1 //
see below
end
/////////////////
objectives:
waitthread global/objectives.scr::add_objectives
1 2 "walk through the door and beyond."
$obj1.origin //
you will find this in
// map
set_objective_pos $obj1 //
sets position for compass by
// targeting script_origin in your .map
end
/////////////////
music1:
// the following music
will be played the files are in pk3 to open
// use winzip
$player stufftext "tmstart sound/music/mus_04f_suspense.mp3"
end
//////////////////
objective1:
goto levelend //
called by the key given to our triggermultiple
in //.map
end
/////////////////
levelend:
waitthread global/objectives.scr::add_objectives
1 3 "walk through the door and beyond."
$obj1.origin
waitthread global/objectives.scr::current_objectives
0 // clears // objectives
exec global/missioncomplete.scr test_xx 1 //
on completion load // this map
end
Right if you come this far and everything
on this has been completed it time to compile and run
the game.But if your ready to learn more than carry
on reading.
Remember our door, lets make it into a func_rotatingdoor.
Reselect it and delete it now make another door the
same size and put in place. Now to make your hinge for
the door , select the textutre->common->origin.
Now make your brush and place it as shown below.
Once in place select both the origin/hinge
and the door/brush use Lshift and Lmouse.once selected
press the n key and find func_rotatingdoor double-click
it , then tick the auto open box an give an angle of
90 (a rotating door should always point from hinge to
handle) see below.
Okay if you've tried the bsp or map
provided with this tut you will find a window with a
sky that seems to go on forever but if u looks at figb4
you'll find that is just a brush with a sky texture.
simple but effective !
To make a sky window simply remove
a wall and create another one with a window in it. Move
into positon and apply your texture the one I have used
is sky->mohday1.
So there you are for now. Have a mess
about and get used making scripts and the editor because
in part 3, the german_ai will be introduced and I will
be taking less time explaining the mapping,scripting
and entities so I can cram more into these tuts. I hope
you have all found this document to be helpful.
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/adding_objectives.php on line 323
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/adding_objectives.php on line 323
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/adding_objectives.php on line 323
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/adding_objectives.php on line 334
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/adding_objectives.php on line 334
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/adding_objectives.php on line 334