Stalingrad 1943 teaser

Made a map or mod? Announce it in this forum!

Moderator: Moderators

[ARGW] Tenebris
Corporal
Posts: 43
Joined: Tue Apr 20, 2004 3:58 am
Location: Buenos Aires, Argentina
Contact:

Post by [ARGW] Tenebris »

Yes, Bjarne, I remember The Hunt... So... ?Come on, don't be modest...!

Random Objective Positions on The Hunt don't count... The graveyard on The Hunt is a fairly flat, open location, with good visibility... And the objective locations are placed on a fairly straight line one behind the other... ?And the Flak Cannon is huge, you can't miss it even with your monitor turned off...! Once you've reached the graveyard, there's not to much posibility to "get it wrong", take the wrong path or anything...

No matter where the cannon is at, you're bound to find it following the same route every time... I mean: the Random Objective Positions on The Hunt are, after all, allways the same position...

And they didn't use Random Positions on any other stock maps...

And you don't see well thought Random Positions on many user's maps... For me, this is the first time I see Random Positions used in the right way...

So... The ovation goes on...
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Dont't get me wrong: I love me. :)

But the objective I did is more or less exactly designed as in "The Hunt". It swawns in one of 3 preset locations. The difference is that it is made up of script_objects(the boxes) and a bunch of script_models. "The Hunt" objective is made up of script_models.

Actually, this code:

Code: Select all

random_objective_location_setup:
	local.location_index = ((randomint 3) + 1)
	local.location = $("cache_pos" + local.location_index)
	local.base = $cache_pos1
	local.movement_offset = local.location.origin - local.base.origin

	$cashe_bomb.origin += local.movement_offset
	$cashe_bomb_trigger.origin += local.movement_offset
	$chunk_target1.origin += local.movement_offset
	$chunk_target2.origin += local.movement_offset
	$chunk_target3.origin += local.movement_offset
	$chunk_target4.origin += local.movement_offset
	$chunk_target5.origin += local.movement_offset
	$chunk_target6.origin += local.movement_offset
	$chunk_target7.origin += local.movement_offset
	$chunk_target8.origin += local.movement_offset
	$chunk_target9.origin += local.movement_offset

	if ($exploder == NULL)
		level.exploders = 0
	else
		level.exploders = $exploder.size
	if (level.exploders > 0)
	{
		level.exploder = exec global/makearray.scr $exploder
		for (local.i=1;local.i<level.exploders+1;local.i++)
		{
			level.exploder[local.i].origin += local.movement_offset
		}
	}
	if ($exploderfire == NULL)
		level.exploderfires = 0
	else
		level.exploderfires = $exploderfire.size
	if (level.exploderfires > 0)
	{
		level.exploderfire = exec global/makearray.scr $exploderfire

		for (local.i=1;local.i<level.exploderfires+1;local.i++)
		{
			level.exploderfire[local.i].origin += local.movement_offset
		}
	}
	if ($exploderchunk == NULL)
		level.exploderchunks = 0
	else
		level.exploderchunks = $exploderchunk.size
	if (level.exploderchunks > 0)
	{
		level.exploderchunk = exec global/makearray.scr $exploderchunk
		for (local.i=1;local.i<level.exploderchunks+1;local.i++)
		{
			level.exploderchunk[local.i].origin += local.movement_offset
		}
	}
	if ($explodersmashed == NULL)
		level.explodersmasheds = 0
	else
		level.explodersmasheds = $explodersmashed.size
	if (level.explodersmasheds > 0)
	{
		level.explodersmashed = exec global/makearray.scr $explodersmashed
		for (local.i=1;local.i<level.explodersmasheds+1;local.i++)
		{
			level.explodersmashed[local.i].origin += local.movement_offset
		}
	}
end
...will work for ANY bomb objective. All you have to do is add script_origins with targetname cache_pos1, cache_pos2, cache_pos3 and so on. place the cache_pos1 origin where the objective is originally placed, and your objective will select a position at random. 8-)

Oh, and if you don't use 3 positions: change the value in "randomint 3" at the top to the number of positions you DO use.
Admin .MAP Forums
Image
Head above heels.
Post Reply