Pages: [1]
  Print  
Author Topic: State based doors  (Read 9100 times)
sago007
Posts a lot
*

Cakes 62
Posts: 1664


Open Arena Developer


WWW
« on: December 16, 2018, 06:59:02 AM »

I have worked a bit on creating triggers based on the game state.

One of the first thing I have implemented is a trigger that fires while in the active state of Elimination (or warmup).
It can be seen in action here: https://www.youtube.com/watch?v=lHq56Gx058w

This could be used for Elimination maps. You could for instance have one team start in a room that is locked while the other team can find positions.
It is also how I would implemented an objective based gametype like "Assault" if that will be relevant at some point.

If played with old VMs the doors become normal, so players are not actually trapped.

Having a door that is only open while the weapons are active is easy:


The test map: https://files.poulsander.com/~poul19/public_files/elim_test_trigger.pk3
VMs that can play it: https://files.poulsander.com/~poul19/public_files/oa/dev088/gamecode_nightly/
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #1 on: December 17, 2018, 04:30:54 AM »

Is this the same from this 2016 thread? http://openarena.ws/board/index.php?topic=5279.0

Back then, I did create a sort of "recap" of what I understood from that thread:
Quote
- Set "state_targetname/elimination_active" key/value pair on func_door entity (was "targetname/elimination_active" in its first version and in OAX B52, then changed to this) to make doors which are closing (can be blocked) during the "inactive" part of Elimination/CTF_elimination warmup, closed (cannot be blocked) during the "active" part of the warmup, and are open when the real round actually starts.
- Use for isolate areas of the maps during initial part of Elimination warmup (hence, usage with team-dedicated spawn points is required), to keep the two teams initially divided.
- Door will work as usual in other gametypes.
- In case the door has also got a standard "targetname" (e.g. due to being controlled by a button), that would work as expected in other gametypes, but ignored in Elimination and CTF Elimination mode (state_targetname takes precedence).
- To sum up, a door with "state_targetname/elimination active" key/value pair, in Elimination and CTFELimination modes will be closed during warmup and after that always open no matter what. Other modes are unaffected.
Uhm.... so, is it "targetname" or "state_targetname"? Is there some other difference than what I wrote above?
I haven't noticed recent changes in github about this feature... of course it's possible somehow I missed them!
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 62
Posts: 1664


Open Arena Developer


WWW
« Reply #2 on: December 17, 2018, 07:23:46 AM »

@gig. Yes it is the same. I searched but could not find the original thread.

I was like: Did I really forget to write about this on the forum? Turned out that I did not forget to post it.
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #3 on: December 18, 2018, 02:52:35 AM »

Now that I think about it, a possible "design tip" for mappers using those:
- Considering that if "state_targetname/elimination_active" is set, the door will always be open during the actual match (in Elimination and CTF Elimination modes only), in case the door is also linked to a button (for other gametypes), one may set "!gametype/elimination" on the button, to hide the button in Elimination/CTFE, where it would have no effect.
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3775


Trickster God.


« Reply #4 on: December 18, 2018, 09:32:21 AM »

Func_, target_ and trigger_ entities could have new keys for the modes that require them instead of relying on targetnames. Those targetnames could already be taken and lead to unpredictable results.
Logged


"Detailed" is nice, but if it gets in the way of clarity, it ceases being a nice addition and becomes a problem. - TVT
Want to contribute? Read this.
Pages: [1]
  Print  
 
Jump to: