I made a script, but it wont work


(Fr4gg3r) #1

I made a script for a construction of a bridge but it doesn’t works :bored: Could someone please chek it out:
bridge
{
spawn
{
wait 200
constructible_class 2
constructible_constructxpbonus 1
constructible_destructxpbonus 1
setstate bridge_materials invisible

}
built final
{

setstate bridge default
setstate bridge_materials invisible

}
decayed final
{

setstate bridge_materials default
setstate bridge invisible

}
death
{

wm_announce “The bridge has been destroyed!”
setstate bridge_materials default

}

}

When I launch my game to test it I keep getting this error message:
“Func_constucible” has a missing parent trigger_objective_info “(null)”

My func_constructible has the following keys:
classname func_constructible
targetname bridge
spawnflags 12
scriptname bridge

My trigger_objective_info has the following keys:
classname trigger_objective_info
track The bridge
targetname bridge_toi
target bridge
spawnflags 3

My func_brushmodel has the following keys:
targetname bridge_materials
target bridge_toi
classname func_brushmodel


(EB) #2

http://www.wolfensteinx.com/surface/tutorials/et_simple_constructible.html


(Fr4gg3r) #3

I used that tutorial when I made it :frowning:


(TFate) #4

The func_brushmodel should not be targetting anything.


(kamikazee) #5

This is what I see:
The func_brushmodel shouldn’t point to the toi as TFate said.
Next, you get an error

“Func_constucible” has a missing parent trigger_objective_info “(null)”

If you read the tutorial, the func_constructible has a targetname “fence”, and the trigger_objective_info points to it by using the target key set to “fence” as well.


(kamikazee) #6

BTW: Have you noticed there’s a little “search” link at the top-right of the page just under the “forum damage” logo? :wink:


(TFate) #7

If I’m not mistaken his TOI already points at the func_constructible… :smiley:


(kamikazee) #8

Oops. Missed it then.
(or he editted his post, but it’ll be me)


(Fr4gg3r) #9

Tnx all :banana: :banana: It works :clap:
You all deserve a drink :beer: :bump:
:drink:


(Fr4gg3r) #10

Tnx for all the help guys im making it hard for my self but I wont a bit more maybe you fellows could give me a link or a hint whit this. I want the same as the tank barriers in goldrush, that if you “fix” the box that something is beeing build, how do I do that, I can’t find anything how to make it work good, could someone give me a link or something ? :???:


(kamikazee) #11

Have you read the example in the LDR?
I believe there was an example in there that worked quite well. You have setup most of your code allready, so this shouldn’t be such a big problem anymore as it was to me when I read it the first time.


(Fr4gg3r) #12

Damn, I spend hours and hours reading .scripts I finaly understand the most of it. So I made a script but if I try to build the thing, I don’t get that repair arm could someone please help me ?
tower
{
spawn
{
wait 100

}
	trigger setup
	constructible_class 2	
{
	setstate alliedconstruct1_materials default	
	setstate alliedconstruct1_clip default	
	setstate alliedconstruct1_flag default

	setstate tower invisible
}
	built final
{
	setstate alliedconstruct1_materials invisible	
	setstate alliedconstruct1_clip invisible	
	setstate alliedconstruct1_flag invisible

	setstate tower default
}
	decayed final
{
	trigger self setup
}
	death
{
	trigger self setup
	wm_announce "Tower has been contructed"
}

}


(Ifurita) #13

constructible_class 2

This part should go into the spawn section


(Fr4gg3r) #14

Tnx for the quick reply I changed it but I still can’t build my tower :frowning:


(smallwood2000) #15

check http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=11919 i have a cronstrution that works in game but still cant see the materials


(Fr4gg3r) #16

Well everyone thanks for all the help but its script reading time for me again :frowning:


(TFate) #17

Post your updated script and entity info and I’ll take a look-see at it. :smiley:


(Fr4gg3r) #18

Yeah :D:D:D:D:D :banana: :banana: :banana: :banana: I finaly got it working :clap:


(smallwood2000) #19

http://uk.geocities.com/caldecottlambert@btinternet.com/cs.htm

I tutorial i wrote on dyanmiteing and construting sos i wos to late

if anyone has any tutorial files they would like me to post on my site then please send them to

smallwood2000@hotmail.com