Page 1 of 1

is not a entitiy o.O?

Posted: February 14th, 2008, 8:57 pm
by waywaaaard
I got a little script but always when I want to linkto something it doesn't work

Code: Select all

main() 
{
	maps\mp\_load::main();

	game["allies"] = "american";
	game["axis"] = "german";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["american_soldiertype"] = "normandy";
	game["german_soldiertype"] = "normandy";
	
	thread trainride();
}

trainride()
{
ttrain1 = getent ("ttrain1_train", "targetname"); // script brushmodel
ttrain1door = getent ("ttrain1_door", "targetname"); // script brushmodel
ttrainspeaker = getent ("ttrain1_speaker", "targetname"); // script model
televator1 = getent ("televator_1", "targetname"); // script brushmodel
ttrain1trig = getent ("ttrain1_trigger", "targetname");
// ttrainspeaker linkto(ttrain1); doesn't work

while(1)
{
ttrain1trig waittill ("trigger");

// door open and close
ttrain1door moveX (4, 1, .5, .5);
ttrain1door waittill ("movedone");
ttrain1door moveY (-40, 1, .5, .5);
ttrain1door waittill ("movedone");
wait 5;
ttrain1door moveX (-4, 1, .5, .5);
ttrain1door waittill ("movedone");
ttrain1door moveY (40, 1, .5, .5);
ttrain1door waittill ("movedone");

ttrain1door linkto ("ttrain1"); // here I get the error Is not a entity o.O

ttrainspeaker playsound ("train_start");
ttrain1 moveY (2063, 20, 1, 1);
ttrain1 waittill ("movedone");

}
}
dunno why I always get this error
is not a entity when I try to link the door to the rain

Posted: February 14th, 2008, 11:02 pm
by Drofder2004
put a .5 second wait before and after.

If still getting error, comment (//) out the line and see if the rest of the script works.

Posted: February 15th, 2008, 3:45 am
by Nightmare
make sure you enable linkto for ttrain1

Posted: February 15th, 2008, 8:13 pm
by waywaaaard
if i dont linkto the door to the train it works and I already tried to enable linkto but then it occurs the error already enabled :-(
dunno why it doesnt work -.-

Posted: February 15th, 2008, 9:03 pm
by Drofder2004
Lev!athan wrote:if i dont linkto the door to the train it works and I already tried to enable linkto but then it occurs the error already enabled :-(
dunno why it doesnt work -.-
have you tried the wait commands i suggested?

Posted: February 15th, 2008, 9:17 pm
by waywaaaard
î tried and get still the is not an entitiy error in line

Code: Select all

ttrain1door linkto ("ttrain1"); // here I get the error Is not a entity o.O 

Re: is not a entitiy o.O?

Posted: February 24th, 2008, 6:02 pm
by Drofder2004
Topic cleaned.

Ok, I have looked at your map but due to not having a full install I am unable to test things my self but here is one thing which may be the problem.

Neither the train nor the door have an origin brush connected to them
(Create an origin brush (small 6x6x6 square with origin texture) and copy it in the exact same place. Then remake the script_brushmodels using these origins, 1 origin for each)

Re: is not a entitiy o.O?

Posted: February 24th, 2008, 6:04 pm
by Drofder2004
If that still does not work, send me the new map file, the gsc and the compiled version of the map (along with all the textures etc).