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

Creating a triggerable farplane :: MPowell1944
-------------------------------------------------------------------------------

Follow the following steps to create a triggerable farplane. For this tutorial, we will be creating 2 triggers. One to activate the farplane and one to kill the farplane. I assume you already have at least a building and a .scr file created so that you can simply run through this tutorial rather quickly.

  1. Open MOHRadiant.

  2. Draw a brush the exact same size as your doorway and place it 1 grid (using a scale of 8) away from the doorway. Make sure that this brush is on the outside of the building. This will be the trigger that activates the farplane.

  3. Now with the brush selected, right-click in 2D view and select trigger_multiple. Press N to get the Properties Window, and enter targetname as the KEY and enter fogon1 as the VALUE. Now press Enter and then press N to leave the Properties Window.

  4. Draw another brush the exact same size as your doorway and place it 1 grid (using a scale of 8) away from the doorway. Make sure that this brush is on the inside of the building. This will be the trigger that kills the farplane.

  5. Now with the brush selected, right-click in 2D view and select trigger_multiple. Press N to get the Properties Window, and enter targetname as the KEY and enter fogoff1 as the VALUE. Now press Enter and then press N to leave the Properties Window.

Make sure to save your .map file!

That is all for the mapping part. Now on to the scripting part.

  1. Right below level waittill spawn, add this script:

    thread fogon1
    thread fogoff1

    end

    fogon1:
    $fogon1 waittill trigger
    thread fogramp 4000
    // Substitute 4000 for whatever number
    // your original farplane is
    goto fogon1
    end

    fogoff1:
    $fogoff1 waittill trigger
    thread fogramp 20000
    // Substitute 20000 for any number.
    // Make sure it is higher than your
    // original farplane number
    goto fogoff1
    end

    fogramp local.rampto:
    if (level.fogplane == local.rampto)
    {
    end }
    else if (level.fogplane < local.rampto)
    {
    for (local.bleh = level.fogplane; local.bleh < local.rampto; local.bleh += 100)
    {
    level.fogplane = local.bleh
    $world farplane level.fogplane
    wait .01
    }
    end
    }
    else
    {
    for (local.bleh = level.fogplane; local.bleh > local.rampto; local.bleh -= 100)
    {
    level.fogplane = local.bleh
    $world farplane level.fogplane
    wait .01
    }
    end
    }
    end

  2. Now save your .scr file and compile your map. Then use either WinZip or PakScape to back up your files and place your .pk3 in /main. Run your map and have fun.

You can easily adjust farplane so that your level feels more realistic to the players. I just used 4000 and 20000 as examples for this tutorial. You may use whichever variables you wish. If you wish to add more than one set of triggers, just add 1 to the number on the end of their targetnames, and so on. Make sure to change the script to match the new numbers.

I hope you have found this tutorial helpful. If you have any questions or problems with this tutorial, please contact me so that I may help you. Thanks.

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/triggerable_farplane.php on line 196

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/triggerable_farplane.php on line 196

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/triggerable_farplane.php on line 196


 


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/triggerable_farplane.php on line 207

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/triggerable_farplane.php on line 207

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/triggerable_farplane.php on line 207