construction materials not showing up


(Mammoth Entertainment Inc) #1

hey here is my script for 3 destryoable/buildable doors which start constructed. when they are destroyed the amterials do not goto default so i can see them. So i can still build the door but i have to use the plyers where thet actual door is. is there an error in my script? i got it from a tutorial o nsurface forums/tutorials… thanks guys

and naming si correct(no spelling errors)


axis_dr_1
{
	spawn	
	{
		wait 200
		constructible_class 2
		constructible_constructxpbonus 3
		constructible_destructxpbonus 3
		setstate axis_dr_1_materials invisible
	}	
	built final
	{
		setstate axis_dr_1 default
		setstate axis_dr_1_materials invisible
	}
	decayed final
	{
		setstate axis_dr_1_materials default
		setstate axis_dr_1 invisible
	}
	death
	{
		wm_announce "The Security Door has been destroyed!"
		setstate axis_dr_1_materials default

	}
}

axis_dr_del
{
	spawn
	{
		wait 200
		constructible_class 2
		constructible_constructxpbonus 3
		constructible_destructxpbonus 3
		setstate axis_dr_del_materials invisible
	}
	built final
	{
		setstate axis_dr_del default
		setstate axis_dr_del_materials invisible
	}
	decayed final
	{
		setstate axis_dr_del_materials default
		setstate axis_dr_del invisisble
	}
	death
	{
		wm_announce "The Loading Bay Door has been destroyed!"
		setstate axis_dr_del_materials default
	}
}

axis_dr_fuel
{
	spawn
	{
		wait 200
		constructible_class 2
		constructible_constructxpbonus 5
		constructible_destructxpbonus 4
		setstate axis_dr_fuel_materials invisible
	}
	built final
	{
		setstate axis_dr_fuel default
		setstate axis_dr_fuel_materials invisible
	}
	decayed final
	{
		setstate axis_dr_fuel_materials default
		setstate axis_dr_fuel invisisble
	}
	death
	{
		wm_announce "The Fuel Depositry Door has been destroyed!"
		setstate axis_dr_fuel_materials default
	}
}


(Ifurita) #2

Have you tried running with scriptdebug to make sure the death events are actually being triggered and the right setstates are called?


(Mammoth Entertainment Inc) #3

nope but i just thoguth of something, the materials brushes dont have a scriptname… should they?


(Ifurita) #4

i don’t think so, though they do need to have a targetname. I tend to assign them the same script and target names


(Mammoth Entertainment Inc) #5

i got target naems but no scriptanmes, i’ll throw em i nand try, worst case i can take em out. and i don’t know how to do the scriptdebug u were talkin about


(Mammoth Entertainment Inc) #6

Btw, I am having another problem when I compile using a -light - faster compile. Here is what I see in the console in the editor.


--- SetupBrushes ---
    11516 opaque brushes
--- SetupSurfaceLightmaps ---
    33405 surfaces
    29827 raw lightmaps
     1111 surfaces vertex lit
    32294 surfaces lightmapped
    32097 planar surfaces lightmapped
        0 non-planar surfaces lightmapped
      197 patches lightmapped
        0 planar patches lightmapped
--- SetupTraceNodes ---
************ ERROR ************
safe_malloc failed on allocation of 204996608 bytes

all the compile error lists i have looked at do not have this error listed. I hope its not saying i need to clear up that much space.


(nUllSkillZ) #7

A little example map:
http://www.nullskillz.de/et/maps/func_const.zip


(Mammoth Entertainment Inc) #8

it doesnt really help, seeing how i cant read wut ever language that is lol.


(nUllSkillZ) #9

game_manager
{
	spawn
	{
		// Game rules
		wm_axis_respawntime	15
		wm_allied_respawntime	15
		wm_set_round_timelimit	5
		
		// Stopwatch Modedefending team
		wm_set_defending_team 0

		// Gewinner Team, wenn Zeit abläuft
		wm_setwinner 0

		wait 2000
	}
}


//Scriptteil zum func_constructible des Klotz
Klotz
{
	// is executed during mapstart:
	// calls the setup of the scriptpart
	// sets the constructible_class
	spawn
	{
		wait 200
		trigger self setup
		constructible_class 2 // 3 = dynamit / 2 = satchel charge
	}

	// sets the constructible invisible
	// sets the building material visible = default
	trigger setup
	{
		setstate Klotz invisible
		setstate Baumaterial default
	}

	// build start
	// sets the func_constructible underconstruction
	// sets the building material default = visible
	buildstart final
	{
		setstate Klotz underconstruction
		setstate Baumaterial default
	}

	// build end
	// sets the func_constructible default = visible
	// sets the building material invisible
	// + Message
	built final
	{
		setstate Klotz default
		setstate Baumaterial invisible
		wm_announce "The func_constructible has been build"
	}

	// unfullfilled build
	// calls setup of the scriptpart
	decayed final
	{
		trigger self setup
	}

	// is called after destruction
	// calls setup of the scriptpart
	// + message
	death
	{
		trigger self setup
		wm_announce "The func_constructible has been destroyed"
	}
}


(nUllSkillZ) #10

doublepost


(Mammoth Entertainment Inc) #11

your a genius lol


(Mammoth Entertainment Inc) #12

anyway i still havent fixed the materials problem but i found a different example (sry nUll) that is in the LDR.

on another note i still get this compile error


--- SetupBrushes --- 
    11516 opaque brushes 
--- SetupSurfaceLightmaps --- 
    33405 surfaces 
    29827 raw lightmaps 
     1111 surfaces vertex lit 
    32294 surfaces lightmapped 
    32097 planar surfaces lightmapped 
        0 non-planar surfaces lightmapped 
      197 patches lightmapped 
        0 planar patches lightmapped 
--- SetupTraceNodes --- 
************ ERROR ************ 
safe_malloc failed on allocation of 204996608 bytes <<<<ERROR IS HERE :(


(EB) #13

memory problem…


(Mammoth Entertainment Inc) #14

i thought about tha but i sill got over 100GB left on the hd


(nUllSkillZ) #15

Try to search the q3map2 forum for ‘‘lowmem’’ or ‘‘lomem’’.


(EB) #16

Mammoth, it isn’t the harddrive I am speaking of.

You should go here>>PCWORLD.COM and sip some of the water before you dive in further(read some articles on basic PC operations and functions).


(Mammoth Entertainment Inc) #17

oh k lol but on the script note, if it helps i followed this scripting tutorial for constructables
http://www.wolfensteinx.com/surface/tutorials/et_simple_constructible.html

i tried your script and another script but i cant get it to work because the object starts constructed already… i dont knwo hwo to change it because it appears (to me anyway) to loop back into what it uses to make the fence in teh beginning, as for what is uses to amek the fence when it is destroyed. If tht makes sense lol.

-will check out the link


(Mammoth Entertainment Inc) #18

ok apparently i need mroe virtual memory, i increased it to 1024 before i started mapping so now i guess around 2000 is more than enough? also where do i put the -lomem switch that they are talking about, there is no sight of it in my editor.


(CptnTriscuit) #19

If I recall correctly, there is a bug with constructables that “start built”. Just as you say, they wont interact correctly with their materials.


(Mammoth Entertainment Inc) #20

ok i turned off all teh start constructed and changed the scrip to this


axis_dr_1
{
	spawn
	{
		wait 200
		constructible_class 2
		constructible_constructxpbonus 3
		constructible_destructxpbonus 3
		setstate axis_dr_1 invisible
		setstate axis_dr_1_materials default
	}
	built final
	{
		setstate axis_dr_1 default
		setstate axis_dr_1_materials invisible
	}
	decayed final
	{
		setstate axis_dr_1_materials default
		setstate axis_dr_1 invisible
	}
	death
	{
		wm_announce "The door has been destroyed!"
		setstate axis_dr_1_materials default
	}
}

it builds fine but still nto matersials show when the map starts or after it is destroyed. the tut i used to maek the actual models says that i have to have the materials as func_brushmodels and target “doors name”_toi. is any of that right. I am soo lost at what to do, tried like 5 different scripts…