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/setup_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/setup_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/setup_objectives.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/setup_objectives.php on line 64

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/setup_objectives.php on line 64

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/setup_objectives.php on line 64
 
 

Setting Up Objectives :: Wombat
-------------------------------------------------------------------------------

This tutorial follows on from the Scripted Exploders Tutorial.

The usage of the obj_dm.scr threw me for a while, but I managed to work out how to use this versatile script. I knew what had to be set, but could not get the game to set, via the [key][value] method. Part of the script, calls for the 'self.trigger_name' Variable. I worked out that this referred to the bomb, but when I set the bomb.trigger_name via the editor, and called the external routine and checked the print out the script outputs to the console (ingame). I could see that it was finding 'self.trigger_name' to be "NIL". I decided to change those variables required in the script, before initiating the bomb_thinker thread. Needless to say, is , if you set up the objectives, as I describe, and use my script method( feel free to use it ) then the objectives will play just like Omaha Beach or any other Objective map. To test the objective scripts. You need to comment out the 'level waitill roundstart' line by adding the '//'[comment command] ie "// level waitill roundstart" . This line tells the Multiplayer game to wait until two opposing members are in the game. Uncomment before distributing your map....

Now, onto the map editor specific stuff. This is actually easier to set up than the Exploder.

First, we need a Script_object, setting targetname as "Flak88obj1" and the model as "models/statweapons/flak88turret.tik". This is the gun. Add another script_object and give it the flak88base.tik model. This is the base of the gun and will be unaffected by the script.

Next we need another Script_object, set as targetname "bomb2", target as "Flak88obj1", and a model of "models/items/pulse_explosive.tik". Place it somewhere the player can access the bomb. Rotate using the angle[key] degrees[value] method.

Now we need to add the trigger_use. Set it as triggerable, targetname "trigger2". The trigger can be placed around the bomb.

It's all over bar the shouting. Save the map, and compile it. All the important stuff is done in the script. Onto that now.....Load it up in Notepad, and view it!

All the code does really, is set the parameters for the variables needed for the obj_dm.scr, before calling the script.

$bomb.trigger_name = $trigger2 //trigger name that is used for the bomb
$bomb.target.target = $trigger2 //Objective (target)
$bomb.target.destroyed_model = "models/statweapons/flak88_d.tik" //destroyed model of target
$bomb.explosion_fx = "models/emitters/explosion_mine.tik" //explosion FX
$bomb.explosion_sound = "sound/weapons/explo/explo_metalmed1.wav" //explosion sound

$bomb2.trigger_name = $triggerbomb2
$bomb2.target.target = $triggerbomb2
$bomb2.target.destroyed_model = "models/statweapons/flak88_d.tik"
$bomb2.explosion_fx = "models/emitters/explosion_mine.tik"
$bomb2.explosion_sound = "sound/weapons/explo/explo_metalmed1.wav"

To access game entitys from the script, you prefix a $ sign to the targetname ie $bomb or $trigger2

You set up a bomb_thinker thread for every bomb (objective) you have in your map.

ie: $bomb thread global/obj_dm.scr::bomb_thinker
$bomb2 thread global/obj_dm.scr::bomb_thinker

Don't forget to modify the line level.targets_to_destroy = 2
to reflect the number of objectives.
Next the threads need to be set up for the scenarios. Allies or Axis win.

$bomb thread axis_win_timer
thread allies_win_bomb

thread bomb1_exploded $bomb
thread bomb2_exploded $bomb2

The first line says . If the bomb still lives , after the level times out, the axis win.

The second line says. Start a thread that checks for objectives all completed. Allies win.

The third and fourth lines start threads that wait for the bomb to be detonated and then outputs text to the screen.

Congratulations, you should be able to run the game, and enjoy the objectives you have set up. Next comes the hard bit, Mapping your Map. Good Luck and happy mapping.

The full exploder / objectives script is located here.

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/setup_objectives.php on line 242

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/setup_objectives.php on line 242

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/setup_objectives.php on line 242


 


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/setup_objectives.php on line 253

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/setup_objectives.php on line 253

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/setup_objectives.php on line 253