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/ai_alarm.php on line 24

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/ai_alarm.php on line 24

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/ai_alarm.php on line 24

 
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/ai_alarm.php on line 59

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/ai_alarm.php on line 59

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/ai_alarm.php on line 59
 
 

AI Alarms :: mohaa_rox
-----------------------------------------------

This tutorial will show you how to add AI that switches on alarms and spawners charging at you. I assume you know how to add AI and do basic mapping.

Getting Started

First create a basic room and a player_start. I added lights too. I made a room that is separated from the place where I am, and added a guard shack. Just find some guard shack prefabs,

Next, place an enemy AI with targetname "enemy".

Add some pathnodes that lead into the guard shack. In the guard shack, add an alarmswitch (right click, animate-->equipment-->alarmswitch) with targetname of "alarm". Then put a trigger use around the switch with setthread "alarm_player_reset". When you're done, your map should look like this:

Great! In my other room, I added some enemies with targetnames "alarmspawner". I also added some pathnodes that lead out of the room.

Ok, you're almost complete! Now for the scripting.

Scripting

The scripting is rather easy to understand:

//test_alarm
//architecture: mohaa_rox
//scripting: mohaa_rox


main:
level waittill prespawn
exec global/alarmer.scr
//loads the alarmer script

level waittill prespawn

exec global/ambient.scr m2l1a

level waittill spawn

$player item weapons/colt45.tik
$player item weapons/thompsonsmg.tik
$player ammo pistol 1000
$player ammo smg 1000
$player useweaponclass smg
end

alarm_player_reset: //our setthread value
thread global/alarmer.scr::alarm_player_reset
end

Save your map as test_alarm and compile your map and play!

How it works:

The alamer gets threatened. He runs into the guard shack, sees the alarmswitch, and turns it on. Then the spawners will run towards you using the pathnodes and attack you. Once you kill them all, they will keep spawning, until you turn off the switch. You will get prompted to approach alarms and turn them off after a while.

[ 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/ai_alarm.php on line 170

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/ai_alarm.php on line 170

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/ai_alarm.php on line 170


 


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/ai_alarm.php on line 183

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/ai_alarm.php on line 183

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/ai_alarm.php on line 183