create delete cmds in script


(whoosaaa) #1

Hi

My question is if its possible to scripttrigger a delete cmd if scriptname is missing on entitie.

Because i wanna delete a door thats kind off a pain in the ass, but scriptname is missing in map.
Example:

Oasis teamdoor1 is gone when wall is breached. Nullskillz done it with setinv.
But if scriptname is missing ya can only delete it from start with delete cmd.

game_manager
{
spawn
{
delete
{
origin “x y z”
}
}
}

So my question is if its possible to trigger this event.

btw origin ya can find out by open bsp file with editor!!


(nUllSkillZ) #2

You could delete it in the game_manager spawn scriptblock and create a new model with clipbrush with scriptname.
You could try to set the state of this new model with a script.
May be it’s working.

Edit:

Might be difficult/impossible to synchronise a doormodel with it’s clipbrush.
Maybe some kind of scriptmover.


(Igloo) #3

Nah, whether I tried to create doors or movers it seemed to be a big fail. You cannot make something like an origin brush in the center of a model so then can’t get it working :slight_smile:

However I didn’t understand what whoosaaa was asking about lol -,-’

Greetings,
Igloo


(ailmanki) #4

maybe you can call the delete from a trigger, and not only in game_manager spawn…
In wiki it only says it should be called in game_manager…
http://wolfwiki.anime.net/index.php/Map_scripting

else you could try qmm with stripper plugin… This allows for modifiying existing entities…
http://cybermind.user.stfunoob.com/qmmplugins/stripper/

:stuck_out_tongue:


(Igloo) #5

Oh yeah, I know what the question was… of course it’s possible to do something like it was told!

My random example:

In the game_manager section I already used the boom_1 targetname to create a func_explosive. Now I want to remove it and do it once again. For boom_section I used a target_script_trigger entity.

boom_section
{
	spawn
	{
		wait 10000
		trigger self case_del
	}

	trigger case_del
	{
		delete
		{
			targetname "boom_1"
		}

		create
		{
			scriptName "boom_1"
			classname "func_explosive"
			targetname "boom_1"
			origin "15 -5 30"
			mins "-5 -5 -5"
			maxs "10 20 10"
			health "25"
			spawnflags "1"
		}

		wm_announce "^1DELETED!"

		//wait 1000
		//trigger self next_case
	}

	// (... the rest ...)
}

I hope you understand now :wink:

Greetings,
Igloo


(whoosaaa) #6

Nope, what you are talking about is already a create witch ya delete and create again within the game_manager if im correct…

What im talking about is an entitie witch was allready there and made by mapper, compiled and forgot to add to entitie the famous scriptname…

Still have to try the method of ailmanki.!!

Greets WhooSaaa


(whoosaaa) #7

well got a bit further…saw example of my problem in etpro forum…
Second stage build of dump…replaced with door…
Example runs on shiven server.

Untill now i got this far…

used delete to delete origin within game_manager/spawn and added create.
Found model number in bsp. tryed it but server crashes.

game_manager
{
spawn
{
delete
{
origin “-1248 -3392 246”
}
create
{
scriptname “door_test”
origin “-1248 -3392 246”
classname “misc_gamemodel”
model “*63”
modelscale 1
contents 1
clipmask 1
}
}
}

let ya know when it works