spawn_random_leader local.num:
// find a spawnpoint
local.spawnpoints = $("spawn" + local.num)
// local.spawnpoints is now the list of available spawnpoints
// find a random index
local.index = randomint (local.spawnpoints.size - 1) + 1
// randomint <max> returns a number between o and max
// so randomint <size - 1> returns a number between o and
// the number of spawnpoints - 1
// after +1 local.index is a number between 1 and
//the number of spawnpoints.
local.spawnpoint = local.spawnpoints[local.index]
// ordinary spawn code here, e.g.
local.enemy = spawn models/human/allied_misc_manon.tik
local.enemy.origin = local.spawnpoint.origin
local.enemy.angles = local.spawnpoint.angles
local.enemy.targetname = "leader"
local.enemy.health = 200
thread target
end
theend:
iprintIn "The resistance leader has been killed. Mission completed!"
waitframe
teamwin axis
end
The manon (a request from JV_map ) is spawned randomly in the map (that is : at several places in the map are script_origin 's with targetname= spawn1) That part is working fine. But whenever I add the SECOND CODE (target) the manon won't spawn anymore...
ahhhh, you're kidding me...????? I tried and I tried..I searched on the internet...almost cried out loud..and started to think I could only make a bombing objective again...i instead of I...aja aja ajaa aj...
I could kiss you if this works... Thanx for your fast response..
sounds interesting to have an assassination objective;). One question though, what happens if one of the players of the defending team decides to spoil the fun and starts shooting at their own leader?
Maybe someone great will come up with that. Every played CS? You know the as_tundra or as_highrise, someone gets to be the VIP. Maybe a MOD can make this, with a classname "VIP" and the enemy will win when the VIP is killed.
Live to map, not map to live. -mohaa_rox, .map
moderator
pantera wrote:sounds interesting to have an assassination objective;). One question though, what happens if one of the players of the defending team decides to spoil the fun and starts shooting at their own leader?
then the other team wins...I already tested this...everyone can shoot the leader...but setting the health a little higher (1000) it will prevent teammates killing their leader by accident... This script together with the random spawnscript makes it much more difficult for the team who has to kill the leader...
That would be cool! Like CS, maybe someone can make some classname of VIP and make random selections of the leader. Then the denfending team will have to escort the VIP to the other side while the enemy has to kill him, probably like crossroads with snipers everywhere. Cool.
Live to map, not map to live. -mohaa_rox, .map
moderator