Teamdoors and stuff.


(LL-Atan) #21

Sorry for digging this up.
But I have a problem with a team door I can’t solve up to now. Maybe someone can help.

etl 275
GtkRadiant 1.6.5

Goal:
Elevator door,build out of two pieces, one open to left and one to the right, axis, destroyable by allies dynamite.

What is working up to now:
Axis can open the door, both door-sides are moving correct, closing again.
Allies can’t open, a door lock is shown. (no dynamite as expected)
Allies can dynamite the elevator door. (I used different brush for the explosion so a death script is triggered)

Problem:
Only one side of this elevator door will be killed by the script, the other side remains.
If I remove the Team value pair, then both door-sides are away as wanted after the explosion.
Sure axis can’t open both side by one touch while removing the team value pair in this case.
I tried two different names for the two door-sides and used them inside the script, but no way.
As long as I use the Team value pair, one side can’t be killed, invisibled or what else.

Any ideas, examples?


(Teuthis) #22

[QUOTE=LL-Atan;558580]Sorry for digging this up.
But I have a problem with a team door I can’t solve up to now. Maybe someone can help.

etl 275
GtkRadiant 1.6.5

Goal:
Elevator door,build out of two pieces, one open to left and one to the right, axis, destroyable by allies dynamite.

What is working up to now:
Axis can open the door, both door-sides are moving correct, closing again.
Allies can’t open, a door lock is shown. (no dynamite as expected)
Allies can dynamite the elevator door. (I used different brush for the explosion so a death script is triggered)

Problem:
Only one side of this elevator door will be killed by the script, the other side remains.
If I remove the Team value pair, then both door-sides are away as wanted after the explosion.
Sure axis can’t open both side by one touch while removing the team value pair in this case.
I tried two different names for the two door-sides and used them inside the script, but no way.
As long as I use the Team value pair, one side can’t be killed, invisibled or what else.

Any ideas, examples?[/QUOTE]

I would work with accum variables here. If your left door is not killed I would use the accum variables to tell the left door to only move if the right door is not killed. Result will be that if the right door is killed, the left will follow.


(LL-Atan) #23

Thank you for answering Teuthis!
I’m just a beginner with this ET scripting stuff and must dig in how to use accum variables now.
But more complicated (in the moment) seems tor me how to do this ‘right door still alive’ check inside the script.
Let’s see if I can handle it, I have to read and think over it now.


(Mateos) #24

If the other entities have a targetname, you could turn them invisible through the setstate command in the death routine of the killed entity


(LL-Atan) #25

Well, this seems not to work.

For clarification:
I made a second pair of slide doors.

classname func_door / func_door
targetname like: door_right_2 and door_left_2
angle 270 / 90

I had to open both sides separate as thought.

Inside death routine of the -entity to be killed- I wrote

death 	 
{ 	 
	setstate [B]door_right_2[/B] invisible
	setstate [B]door_left_2 [/B] invisible
    }

then I killed the entity and both sides became invisible. Good, that works.

Then I made both, the left and the right side to team by giving both the var:
team
aa1

I changed nothing else. Compiled etc…
Started the test map again, both sides opened together, team worked.
Now I killed the entity and…
only one side became invisible now!

I tried it often, it’s a fact that giving the team var will pruduce this problem (for me)


(Mateos) #26

In this case, is only the door_right_2 one going invisible, and not door_left_2?

If so, try to add a little delay between these two instructions

You can use g_debugScript 1 to check what script lines are executed in the console


(LL-Atan) #27

just tested it, there is no difference if I’ll write:

{
setstate door_right_2 invisible
setstate door_left_2 invisible
}

or

{
setstate door_left_2 invisible
setstate door_right_2 invisible
}

it’s the door_right_2 which will go away in both cases…

I tried wait 10 , wait 50 between, but no success.
A wait of 500 produced problem, no door is hidden.

Edit:
Script debug gives me a warning that:
setstate ( door_right_2 ) called and no entinities found.

Confuses me because this door_right_2 side is set to invisible state :slight_smile:


(Mateos) #28

Check for typos

Else, could you please make a little prefab with just these entities and a .script with just these?

So we can mess around with it if it isn’t a typo somewhere


(LL-Atan) #29

ok, I tried… check PM


(Mateos) #30

Alright, tried the following:

  • Inverting in the script the two lines: still the same half gets hidden;
  • Give them the same targetname: same result;
  • Tried to go through a scriptname and do this through a trigger: same result.

It seems that once a part of the team is “invisible”, the rest can’t be reached… If you use the other half, the first half spawn and the double-door opens and stays as-is, while its clip^remains in the middle… There’s some buggy bind done by team attribute I believe there, asked the ETL peeps to look into the code for some clue

Btw, if you want to change the explosive type (grenade, satchel, dyna), it’s constructible_class in the spawn section of the script; See:
http://games.chruker.dk/enemy_territory/scripting_reference.php#construction_related


(Teuthis) #31

Tutorial on accum variables here:

Btw, what happens if you switsch the setstate commands for the two door parts? Is the problem then flipped and the other door affected by the problem? For some reasons, your script skipps a line. Since you already tried different wait values, I would use the accum variables to bind the action of the left door to the death event of the right door. See the tutorial for details


(LL-Atan) #32

For me it seems to be confirmed by Mateos that the team var produces the problem.
There is no way to make this working for now.
I tried some ways using accum, but I couldn’t make it to work. May be it’s my less experience with this.
Nevertheless, thank you both for the links, I’ll need them going ahead.
Teuthis, if you would like to have a look into by yourself I send you a PM.

Edit:

I changed script to:

spawn 	 
{ 	 
	wait 300										
	constructible_class [B]1[/B]

or to
spawn
{
wait 300
constructible_class 2

None of this will change the behavior.

I’m only able to destroy the door by dynamite, the game acting the same as this one here always:
spawn
{
wait 300
constructible_class 3

Can you see what I’m dooing wrong? What else must I do to make it working?
I can’t find a place/var to change this inside trigger or entinity,
just be able using the script.


(Teuthis) #33

Will check but have very little time atm. But will check when I got some minutes


(Mateos) #34

It doesn’t skip a line, at the moment one half is invisible, the game can’t find the other half (setstate error)…

As I pointed, I tried to invert the two lines, very same result (same half invisible, same other half not found so still visible).


(WuTangH) #35

I’ve played with it today a little… If I understood it right, you wanted:
2 side-moving door,
for axis only,
destroyable by allied dynamite.
If yes, here it is: https://www.dropbox.com/s/d7kwadn3b3xq3rv/elevator_door.zip?dl=0
:slight_smile:


(Mateos) #36

Your map doesn’t have a script_multiplayer and doors aren’t linked with a team attribute…

Edit:
Also, his goal was to disable doors when an other objective get destroyed. Or at least it looked like it ^^’

Edit 2:
With team attribute, only a half is gone, fyi…


(LL-Atan) #37

Thx for your help WuTangH.
But as Mateos said, the important thing was to set the var “team” to both door sides.
If you’ll add this var this will produce the problem I told about.


(WuTangH) #38

Aw, I thought “team” means “allowteams” :smiley:
Well this seems really not to work… maybe you can build it with script_movers?


(Teuthis) #39

Why not the following: the door is connected to a button (func_invisible user) which is set per allowteams to axis, so only axis can push and open the door. The door is a script_mover with two sides, one goes to right, one to left (we have this door as prefab on our side). Now you make a little block around the button, which is a constructable so olny when it’s not destroyed the button can be pushed and the door can be opened. Result is a teamdoorcthat opens via button and that can only be used if the button/case is not destroyed…