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/spotlights.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/spotlights.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/spotlights.php on line 3
.map :: Mapping for MoHAA

 
IRC :: #.map on Quakenet.org or simply go to irc://irc.quakenet.eu.org/.map
 

 
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/spotlights.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/spotlights.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/spotlights.php on line 57
 
 

Spotlights :: Surgeon ( Original Instructions by Mackey McCandish )
-------------------------------------------------------------------------------

These tutorials assume you are already familiar with SDK (MOHRadient) or similar and know how to create a basic room with a light, platform etc. See (Basic room tutorial & Basic lights tutorial). It’s also assumed that you have read the documentation that was released with the Editor. Remember to SAVE your map on a regular basis!!!!!
This was written with the help of material found in spotlight.scr

First things first. You need to create a basic room (see First Room tutorial) of size 512x512 (or bigger)

Place your info_playerstart next to the left hand wall. Create an ai_german_wehrmact_soldier near the right-hand side of the map, opposite the info_playerstart. He will be our gunner. With the gunner still selected press I. This opens up the gunner's AI menu. Enter these details as follows:

targetname mg42guy // This sets the gunners name

target mg40 // This sets the gunners target

In the pull down menus select the following values:

type_idle : machinegunner

type_attack: turret

In the turret box on the top right type: mg40

You can also alter variable such as how far (in units) the gunner can hear/see.

Note : It doesn't matter which way the gunners facing

Press n again to return to the main screen. Ok so we have our gunner setup but we need a gun for him to fire. Create a "resting place" for the gun to sit on (mines 48 unit high). Next right click on the map to bring up the entity list. Select static -> weapon -> mg42bipod. Make sure the bipod rests on top of your "resting place"

Next open the entity list again and select turretweapon -> german -> mg42. Now we want this to rest upon the bipod. If you look at any entity it will have an arrow in its box. The direction the arrow points is the direction that the entity will point in. The other end of the arrow (the start) indicates where the origin of the entity. In the case of a turret_weapon it indicates the point around which the gun will turn. Using the smallest grid size possible manuver the gun's origin onto the bipod. With the gun still selected select its properties (n) and enter the following details:

targetname mg40 // This sets the guns name. Notice its the same as the gunners target.

When you return to the main screen you should see a line with arrows running from the gunner to the gun. Congratulations you have linked the gun to the gunner.

Before you move on, if you wish to create "fakebullets" enter:

spawnflags 1 // this means that the gunfire won't hurt you, which is useful if u want to get a look at your handiwork without being drilled.

For your next task, your going to create the spotlight itself.

For this open the entity list again. Select script -> model. This will give you a script_model (a model that is associated with a prewritten script). Open up its properties (n) and enter the following details:

model miscobj/searchlightbase.tik // This sets the model for the script_model to use

targetname spotlight // Sets the name. All scripted spotlights can use the same name

target mg42guy // Sets the target as our German gunner

#set 1 // Sets the spotlight set as 1

#group 1 // Sets the spotlight group as 1

Position the spotlight at a height (mine's about 64 units off the ground) It should really matter just now if the spotlight floats in mid air - this is a tutorial level, not an art gallery.

Ok so now that we've set the spotlights details you'll see a line with arrows coming from the spotlight and going to our German gunner.

Next we need several places for the spotlight to shine. This is where the info_splinepaths entity comes into play.

You need to place a loop of info_splinepath entites in the places where you wish the spotlight to shine. The first info_splinpath that you place needs the following details:

targetname spotpath1_1 // This indicates that the spotlight is to shine on this path (loop).

The use of the value is such : spotpath#1_#2 Where #1 is the #set value of the spotlight and #2 is the #group value of the spotlight. ie if the spotlight belonged to set 5 and group 2 you would use targetname spotpath5_2 and target path1 ie the next info_splinepath.

Obviously the next info_splinepath will have targetname path1, target path2, and so on and so on, with the last info_splinepath targeting the first info_splinepath (spotpath1_1). If you do this correctly the info_splinepath's will have a line with arrows moving from entity to entity.

Ok, now we need to lay down a pattern (at least 5) of script_origin entities (right click, select script -> origin).

The script_origin's are the places the spotlight will flick to when it is in "alert" mode - i.e If the spotlight has illuminated you and you manage to escape its glare, it will flick to several places where you are most likely to be. Likely places include cover i.e crates, etc.

For each one the details are:

targetname spotsearch

#set 1

#group 1

Again the #set and #group values indicate which spotlight the script_origin's belong too.

Last but not least we need to allow the player to shoot out the spotlight. This is done by adding a trigger.

So, select trigger->multiple, from the entity list. Then place the trigger around the script_model that is the spotlight. Open its properties (n), and enter these details:

targetname spotdamage

#set 1

#group 1

spawnflags 128 // Or click on the "damage" box

Lastly open up notepad. Add the lines :

Main:

exec global/spotlight.scr

Save the file as youmapname.scr (ie my map is called test2 so my script is called test2.scr)

Save, compile and watch a gunner try to kill you if you step into the spotlight. Have fun.

 

A quick explaination of the #set and #group keys that we've been using.

The way it works is, spotlights that are supposed to share proximity have the same #set value, but every set of spotlight/ spotdamage/ spot searches have their own unique #group to associate them together. So a bunch of spotlights working together would all have #set 1, but each set of spotlight/ spotdamage/ spotsearches would have a different #group.

[ Download the Example map ]

Need any help : Ask in the Forum

 


 
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/spotlights.php on line 332

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/spotlights.php on line 332

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/spotlights.php on line 332


 


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/spotlights.php on line 343

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/spotlights.php on line 343

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/spotlights.php on line 343