area portal+script_mover=HOM, solution anyone?


(denizsi) #1

I searched and searched and just couldn’t find if this particular thing has been asked before.

I made a script_mover to have a sliding gate controlled by a switch. Works just fine. This gate opens into a tunnel with a dead end for now, so the only way into it is the gate. I put an area portal brush into this script_mover gate. But the area beyond the gate just won’t load when the gate’s open. All I see is HOM. Area portal is structural. No leaks.

Then I remove all references to the script for the gate and make it a simple func_door, or func_door_rotating. On both trials, the area portal works perfect.

So, I’m asking, does area portals NOT work with script_movers? if not, is there a workaround for this? Like putting an invisible func_door to where the script_mover gate is? I thought about trying this out as well but just wanted to ask first.


(Ifurita) #2

I believe area portals need to work with doors and are triggered when the door is opened. The script mover opens the ‘portal’ but since it’s not a door, the arena portal doesn’t recognize that it’s open


(denizsi) #3

I was so sure this would work but it didn’t, I really need some help here with area_portal now:

I changed that script_mover gate to a func_door. Didn’t change anything else at all. And wrote the same script references to the func_door gate. It works great, just like a script_mover. AND it is a func_DOOR. but the area portal still doesn’t work. just stands there, giving me the holy finger of HOM.

//–EDIT–//
detailed recap:

there is a tunnel with a dead end. one entry only.
one script_mover gate to enter it controlled by a button, works perfect
put an area portal brush into the gate. gives HOM when opened.
removed all scripting references, and put a door entity instead, like func_door or func_door_rotating. no HOM, area portals does its job fine

Ifruita told that area portal probably recognizes only the door entities.
so, made that script_mover gate a func_door gate, WITH the script references, which ended up being controlled by button just like the script_mover, which works just great. but, even though it’s a func_door, I still get HOM
tried the same thing but made it a func_door_rotating instead. again, works great as a gate, but again, I get the HOM

So, area portal apperantly recognizes only ‘pure’ door entities. It works fine as long as they are not targeted, or referred by a script. And I desperately need a workaround for this.

I know there’s a func_button entity to use with door entities in Q3 engine but it’s not listed in Radiant. Anyone could tell me how to use it in my map? Should I manually edit the text lines in the map?


(CooperHawkes) #4

http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=6243


(denizsi) #5

thanks but I think I’m close to something.

I made a func_door the size of the script_mover gate and textured it with nodraw. ( Spawnflag: ‘Toggle’ so it’s supposed to wait open or closed until triggered)
Then I gave it the same targetname I gave to my target_script_trigger for the script_mover, so now the func_invisible_user which is used for triggering the button key and the gate also targets this func_door. In short, when I hit the button, both the invisible func_door and script_mover moves and area portal loads the next area beyond the gate. no HOM! so far so good.

new problems: when the script_mover is wide open and I hit the button again to close it ( I don’t have to wait for it to open completely though, I can interrupt it while opening/closing… just thought I’d say ), fine, the script_mover gate closes, BUT the invisible func_door won’t. Gate is closed but I can still see the tris beyond it with r_showtris 2.

I can’t figure out what’s wrong. The func_door and script_mover’s speeds are the same. So, at this moment, “toggle” for func_door functions like “stay open” for func_door_rotating.

open to suggestions


(denizsi) #6

I tried the new updated defs, with func_button. Same as before, it triggers func_door but func_door can not be triggered or moved ever again after that. Now I think there’s a problem in func_door entity itself. Once triggered, it will always move once and never come back, as if you give it a “wait -1” (no return).

The only way to make it work as it should seems to be via scripting, using path_corners with gotomarkers. But then func_door appearantly is no longer treated as a door entity by other… stuff?. At least not for area portals. Still need a workaround


(EB) #7

This MOH tutorial should explain things pretty well. Click on the link within the quote…

Area portals in doors
When we set the filters as we did above: it becomes painfully clear that doors don’t block VIS ( a structural brush with a door texture will block VIS, but not a func_door or func_rotatingdoor ). But this can be fixed with the help of a nice little thing called an area portal. Think of it as a structural brush that can be turned on and off. And the nice thing is that if you place area portals in doors: they will be controlled automatically by the door.
Read the Areaportal tutorial for information on how to use them.


(denizsi) #8

Thanks but the only thing that would be of any use to me is those openportal & closeportal script commands, which would perfectly solve my problem. But those commands are not in ET. The game won’t recognize them and refuse to load the map.

I’m thinking about a little more complex solution now.
One button to trigger both the script_mover and the func_door and area portal, to open them all
and another button to trigger them to close.
As soon as you hit the button to open the gate, it will be replaced by the other button to close it.
This kind of workaround may put some heavy drop on network, I’m not sure though. Gotta test.


(EB) #9

Well, that tut works in relativity, not for the manual code part but just to give you the idea of area portals…I am not in your head listening to your thoughts dude. If you choose to take the hard road, that’s cool.

Why is this so vital ? Why don’t you post a screenshot for us?


(denizsi) #10

finally, I did it and it works just the way I want… What? Here…

This gate ( read about the gate itself here: http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&p=108735#108735 ) leads into this tunnel. And I somehow needed to use an areaportal there with my script_mover gate so I could cut the 2 areas with my gate. Alas, I found out an area portal will only work with a door entity, those being damn func_door and func_door_rotating.

As I told somewhere above, the closest I got to that was by putting an invisible func_door inside my script_mover gate, and have it triggered by the very same switch which controls the gate. No scripting for the func_door since I didn’t really know what command I could use at all with a door entity. Doing this proved half-efficient. When the map loaded, gate is closed by default and so is the func_door. When I hit the switch, as the gate and the func_door opens, area portal loads the next area nicely. BUT after than, I would either have it open forever so even when the gate is closed, the area beyond it would be visible by the engine; or for worse, the func_door would close itself and I’d get the HOM

Now, many many thanks to carnage, I learned this magic command “alertentity”. How could I know that there would be such a command! Bliss Bliss and Heaven!
Again I made an invisible func_door the size of my gate, gave it a scriptname and targetname of fdoor, and set its speed to überspeed!. And put the blissfull code below into my script.

fdoor
{
	spawn
	{
	}

	trigger doitdammit
	{
		alertentity fdoor
	}
}

And I put 3 lines “trigger fdoor doitdammit” to 2 places
1 to just before the gates is triggered to open (gotomarker path_corner N), so justbefore the gate will open, the area portal will load the next area.
1 to just after the gate is triggered to close and wait (gotohell god_dammit M), so just after the gate is closed, the area portal will unload the next area.
And put the last one into the script_mover gate’s spawn, otherwise it would be buggy and would not work right when the map is first loaded and would screw the whole area portal sequence.

So, now, when my gate’s closed, I have an operational teamdoor on it and opening this door will load the next area, and when my gate’s open, the next area is already loaded and it all works like a charm without any bug. What a blissfull day! Thank you all who helped.

EDIT: It’s buggy. It won’t work exactly right during the opening routine. or script, or whatever it’s called.


(G0-Gerbil) #11

Why are you bothering with area portals?
In a MP game (and ET only supports this) your framerate is only as bad as the worst case scenario.
And in worst case scenario, all doors will be open = no gains whatsoever from area portal.

In other words, if your map requires area portals to have a reasonable framerate, your map is doomed and you need to think about how to re-work it so that normal structural + hints keeps the speed smooth enough.


(EB) #12

This thread has been solved here : HERE
He had started a couple threads on the same thing.