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

Ai : Spawning Enemy :: Manstein
-------------------------------------------------------------------------------

There are two ways to get enemies spawning in your level:

(1) Run through a trigger and enemies spawning only one time.
(2) Enemies spawning for each enemy killed before.

The second is more complicated and will be explained later on in another tutorial maybe.

The first one is really simple. Let me show you how to do it!

Ok, let´s start with the MOHRAD. Build a simple map with a wall in the middle.

Next, place an ai_actor in your map. I placed it behind the wall to let it run to the players view after he has touched the trigger.

Give the ai_actor the following keys / values :

$targetname - enemyspawner

#group - 1

#set - 1

model - human/german_panzer_obershutze.tik

Now we give the enemyspawner a destination to run to:

Place an info_pathnode near the ai_actor and give it the following keys / values :

$targetname - enemyspawnerdestination

#group - 1

#set - 1

**Note to give the enemyspawnerdestination the same #set and #group value as the enemyspawner!**

Now we need a trigger_multiple with these keys
and values :

$targetname - enemyspawnertrigger

#set - 1

cnt - 1

That´s it for the map. As soon as the player runs through the trigger, an enemy will appear and start shooting him.
Safe your map as test_yourmapname.map and open your script editor.

Put a

exec global/ai.scr

before the level waittill prespawn, than call

thread global/ai.scr::spawngroup #1 #1

That´s it. Save your mapscript as test_yourmapname.scr and compile the map. Play it and have fun.

Some hints:

1. You can have more than one enemy get spawned by the trigger. Just add as many ai_actors with the same values as descripted above, except the #group value!

The #set determines, which \"wave\" of enemies should be spawned. For example, if you have more than one group of ai_actor(s), info_waypoint(s), and trigger_multiple(s), you will have to give each group another, unique #set - value (1, 2, 3, ...).

The #group determines how many enemies should be spawned by running through the trigger. You can have three or more enemyspawners getting spawned. So you will have to put three ai_actors in your map, each with it´s own, unique #group value.

Have fun

Manstein

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_spawning.php on line 178

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_spawning.php on line 178

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_spawning.php on line 178


 


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_spawning.php on line 189

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_spawning.php on line 189

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_spawning.php on line 189