Page 1 of 1

Exploding features

Posted: 01 Mar 2008, 19:47
by fc14159
A very simple but, in my opinion, useful feature. Features (as in dragon's teeth, wreckages, rocks, etc.) that can explode when their health reaches zero. This will allow maps to have epic explosive features and mods to have mines that can be placed without the need for a player to destroy all of them to win a game. Also, it would be great for features to be visible to the team that made them and cloaked to the other, so mines can be properly invisible.

Re: Exploding features

Posted: 02 Mar 2008, 02:25
by zwzsg
Exploding features would be nice, not sure if implemented or not.

But I don't think you can that easily turn mines into features. Features don't trigger self destruct when they see enemies, features don't even have los to see incoming enemies, features don't even have enemies.
mines that can be placed without the need for a player to destroy all of them to win a game.
That can be fixed in the mod, by having the mines run a script such as:

Code: Select all

// Taken from Kernel Panic .NET WIP8 logic_bomb
// Make sure the mines have a weapon1 that one-shot mines.

	var id;
	//this function checks if any friendly non-mine units are still alive and detonates the mine if not
	for(id = get MAX_ID; id>0; --id) { //iterate through all units
		if (get UNIT_ALLIED(id)) { //see if it's friendly
			if ((8*65536)-1 != (get UNIT_HEIGHT(id))) { //check for units of radius != 8 (for some reason the radius is 1 unit smaller than it should be), should mean everything that's not a mine
				id=(get (MAX_ID))+1; //this check is done because we've found a survivor, go back to the beginning of the unit list and wait a bit
				sleep 500;
			}
		}
	}
	//if this is reached there are no living non-mine friendlies so we detonate the mine
	emit-sfx 4096 from base;

Re: Exploding features

Posted: 02 Mar 2008, 09:20
by KDR_11k
Zw, that should be id=1;id<get MAX_ID since ids are now given out starting at 1 instead of the top end.

Also there's the Does Not Count gadget. http://spring.clan-sy.com/phpbb/viewtop ... 23&t=13853