ETMods.net

N!tmod, a Wolfenstein: Enemy Territory Modification!

You are not logged in.

Announcement

You can donate to help us keeping services online.

#1 08-Jul-12 23:33:04

ailmanki
BETA Tester
Registered: 08-Jun-12
Posts: 42
Website

etpro mapscript statement delete

Please include the ability to delete by all keys; not only by origin.
Cause some entities have no origin, but something else which makes them unique enough. Sometimes for example all explosive barrels in a map have same dmg. So one delete statement could remove em all.


b_350_20_692108_381007_FFFFFF_000000.pngb_350_20_692108_381007_FFFFFF_000000.png

Offline

#2 14-May-13 13:39:08

ailmanki
BETA Tester
Registered: 08-Jun-12
Posts: 42
Website

Re: etpro mapscript statement delete

Bump smile


b_350_20_692108_381007_FFFFFF_000000.pngb_350_20_692108_381007_FFFFFF_000000.png

Offline

#3 14-May-13 14:37:49

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,090

Re: etpro mapscript statement delete

Oh! I totally forgot this thread hmm sorry ^^

Could you please provide me an example of mapscript you'd like to be able to use with this new feature ? I'm not that good at mapscripting and i think an example would definitely help me modifying the delete statement behavior.


iluvnitmod.png

Offline

#4 14-May-13 15:24:36

ailmanki
BETA Tester
Registered: 08-Jun-12
Posts: 42
Website

Re: etpro mapscript statement delete

http://wet.peyote.ch/wet-resources/Spaw … nal.script
http://wet.peyote.ch/wet-resources/Spaw … iss.script
http://wet.peyote.ch/wet-resources/Spaw … _v1.script

Each of these scripts fixes some issue in the map, and it does that by deleting the entity, and then creating it again with other values.

There was a special mod for Quake 3 based games, QMM - it has a plugin called QMM Stripper - which was able to alter all entities in a map. Maybe that helps in your coding quest - probably not much..
http://bunker2.aaxxss.com:8080/stripper_qmm.zip


b_350_20_692108_381007_FFFFFF_000000.pngb_350_20_692108_381007_FFFFFF_000000.png

Offline

#5 20-Jun-13 11:07:13

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,090

Re: etpro mapscript statement delete

I've added this feature, but unfortunately, i cannot test it right now. I'm pretty sure it works but i'd like to test it before releasing a new public build.


iluvnitmod.png

Offline

#6 20-Jun-13 19:57:13

Micha
Member
From: Germany
Registered: 11-Feb-13
Posts: 38
Website

Re: etpro mapscript statement delete

Could be done with lua too.
The following is an example, it just needs a counter like do this after 30 sec.

function et_RunFrame( levelTime )
mapname = et.trap_Cvar_Get( "mapname" )
for i = 64, 1021 do
if mapname == "adlernest" then
                if et.gentity_get(i, "origin") == "733 -2971 -120" then
                    et.trap_UnlinkEntity( i )
                end
            elseif mapname == "reactor_final" then
                if et.gentity_get(i, "classname") == "func_door" then
                    et.trap_UnlinkEntity( i )
                end
            elseif mapname == "2hide_cal_r1" then
                if et.gentity_get(i, "origin") == "-3797 -768 352" or et.gentity_get(i, "model") == "*82" then
                    et.trap_UnlinkEntity( i )
                end
            elseif mapname == "stargate_1945" or mapname == "fueldump" or mapname == "nomercy" then
                if et.gentity_get(i, "classname") == "trigger_hurt" then
                    et.trap_UnlinkEntity( i )
                end
            elseif mapname == "uje_vulcano_escape" then
                if et.gentity_get(i, "classname") == "target_push" or et.gentity_get(i, "origin") == "-4146.49 -1895.74 679.77"  or et.gentity_get(i, "origin") == "-3890.49 -279.74 543.77"  or et.gentity_get(i, "origin") == "-2424.11 -2265.48 311.77"  or et.gentity_get(i, "origin") == "-1424.26 -2130.49 63.77" or et.gentity_get(i, "classname") == "info_notnull" then
                    et.trap_UnlinkEntity( i )
                end
            elseif mapname == "bucket_v2" then
                if et.gentity_get(i, "classname") == "target_kill" or et.gentity_get(i, "classname") == "trigger_hurt" or et.gentity_get(i, "target") == "axis_killer" or et.gentity_get(i, "target") == "allies_killer" then
                    et.trap_UnlinkEntity( i )
                end
			elseif mapname == "odenthal_b2" then
				if et.gentity_get(i, "targetname") == "sideentrance" then --remove sideentrance odenthal_b2 @ e8
					et.trap_UnlinkEntity( i ) 
				end
			elseif mapname == "trooptrain" then
				if et.gentity_get(i, "model") == "*45" or et.gentity_get(i, "model") == "*46" or et.gentity_get(i, "model") == "*49" or et.gentity_get(i, "model") == "*50" then
					et.trap_UnlinkEntity( i )
				end
			end
        end
end

Offline

#7 21-Jun-13 01:35:37

ailmanki
BETA Tester
Registered: 08-Jun-12
Posts: 42
Website

Re: etpro mapscript statement delete

Thats amazing Micha!
Can you also add an entity like that? Or is that only possible for some?


b_350_20_692108_381007_FFFFFF_000000.pngb_350_20_692108_381007_FFFFFF_000000.png

Offline

#8 22-Jun-13 11:43:13

Micha
Member
From: Germany
Registered: 11-Feb-13
Posts: 38
Website

Re: etpro mapscript statement delete

ailmanki wrote:

Thats amazing Micha!
Can you also add an entity like that? Or is that only possible for some?

Not sure, but I don't think so. Creating stuff can be done with mapscript:

    create
        {
            scriptname "wheel"
            targetname "wheel"
            origin "1256 -1125 -330"
            angles "0 170 90"
            classname "misc_gamemodel"
            modelscale 1
            contents 1
            mins "-20 -20 -100"
            maxs "20 20 52"
            clipmask 1
            model "models/mapobjects/blitz_sd/blitzwheelsf.md3"
        }

create
        {           
        scriptname "newdoor1"
        targetname "newdoorr1"
        classname "func_door_rotating"
        allowteams "4"
        origin "-5357 -2540 555"
        type "5"
        model "*45"
        }



Just pm me if you need help with removing objects with lua. I use this way for my infected mod to remove stuff like mg42, doors, hurts,...

Offline

Board footer

Powered by FluxBB