Special Entry & Exit Trigger. Does something like this alrea

Discussions about Coding and Scripting
User avatar
R3plicant
Experienced
Posts: 93
Joined: Sat Jul 21, 2018 1:31 am

Special Entry & Exit Trigger. Does something like this alrea

Post by R3plicant »

Hi folks,

I've been thinking about how to get done what I've discovered needs to happen for my portal map (those with lots of UT99 experience will know that a portal map is one in which players can choose a URL (destination via the web, in-game or otherwise) to go to via in-game teleporters). The situation I have to create is quite specific but unique, (I think).

The necessity is, thus:
  • Players spawn in the portal section of my map.
  • They then walk toward a special teleporter setup, complete with a visual effect (appearing in front of them), and sounds that play.
    Two things should then happen, once when entering the actor's radius and once when exiting:
    • A mover with a visual effect [attached] enters the player's view when (player) enters the radius of this special trigger (or would disappear if exiting it and play a different sound = "Access Denied!"). The 2 sounds (see next point) are to be only audible by the player that triggered them, not by anyone else within the vicinity.
    • 2 sounds, (audible to ONLY triggering player), play separately: one on entry, a different one on exit (i.e walking backwards AWAY from the special trigger's radius, (which in turn would cause the effect to disappear if no one else nearby also inside the radius)). "Access Permitted!" would play immediately after the mover (and its attached effect) has opened. "Access Denied!" would play immediately after the mover (and its attached effect) has closed. Sounds (when played) must be played (once, not looped!) from the area where the player IS, not from the mover/s. As things are now, for operational purposes, the movers cannot be placed close to (within ear-shot) the players.

Basic facts: The special trigger actor needs to work as 'Trigger Control', meaning, a player ENTERS its radius sets off the visual effects attached to the mover and then plays the "Access Permitted!" sound once and will wait indefinitely (while there's a player (or players) inside its radius), until the player (or players), EXITS its radius (as opposed to LEAVING its radius via the teleporter which is within its radius), sets off the mover (and attached effect) BACK to its original place THEN plays "Access Denied!" sound (maybe after a short pause, say 1sec). Again, just to reiterate, the 2 sounds played must only be heard by the player who sets them off, no one else. Incidentally, if the mover (with attached visual effect (particles) has activated to its OPEN position already and another player enters the radius, the sound just needs to play for the new player, the mover & effect doesn't need re-activate for that 2nd instance.

With regards to the movers in my map now, setting the "Access Denied!" sound to one of them (Closing Sound in Mover Properties>Mover Sounds) which closes, it can't play the sound audibly because it's already gone well out of ear-shot before it can play, regardless of a delay or move time (the move time needs to be instant) to the mover; hence the need for this special 'Entry & Exit' trigger.

IMPORTANT 1: The visual effect (attached to a mover), needs to be triggered/set-off by anyone (priority given to it if it's already in view) but it needs to stay in player's view whenever there's a player nearby inside the trigger's radius, regardless if it's 1 player or (upto) 8 and regardless if anyone else leaves its radius, (if THEY leave, THEY get the "Access Denied!" sound played (only) to them but the effect stays there for the other players who are still inside the radius of this special trigger). I hope this makes sense. :)
IMPORTANT 2: This actor *MUST* work in online games.

The portal area of my map is a fast-paced environment, so it needs to be quick, reliable and fully functional.

I have the visual effect and relevant lights performing how I want. I just need the behaviour of them and the interaction between the player/s and the sounds to suit the features and functionality of the visuals in the scene so it doesn't annoy repeat players, besides, who wants to hear every "Access permitted!" when up to 8 players are all scrambling to enter the zone at the same time? It'd get annoying and very confusing very quickly. I looked at Lode's All About Mover site and there's nothing in there that I can see which helps me accurately do what I need, either.


Any ideas or tips welcome. Thanks.

TO CLARIFY

On player ENTRY to trigger radius: Move mover to OPEN then when done play sound A (to instigator only). On player EXIT from trigger radius: Move mover to CLOSED then when done play sound B (to instigator only).
Remembering Important Rules 1 & 2 above. Sounds must only be able to be heard by the person who activated them.




For what it's worth, I have looked at a special event and also looked at using a dispatcher but there seems to be nothing (even when combined) which accurately does what I need to happen in the way I need to; that is, unless I've overlooked something more advanced which already exists and would do the task 100% accurately - if so, how would I set it up properly?

I can send you the map if you need to really see the scene itself, it that would help you help me get this right, then I can send it over to you, (it's a large file, but I have Dropbox). There are two tall 'interior towers' at the bottom of the map, (north and south (from Top view)); they both need the actor for the visuals and 'up-lift/kick tubes' things to work properly. :)

Here's a screenshot of the scene just to give you a rough idea of what I'm trying to deal with:


Image

The 4 triggers you see in the middle of the screenshot are:

[*]White tube trigger light on/off (Trigger Control).
[*]Blue tube trigger light on/off (Trigger Control).
[*]White particle effect [mover] up/down (Trigger Control).
[*]Blue ]White particle effect [mover] up/down (Trigger Control).

The movers (and attached particle effects) are WAYYYY deep inside the base of the towers' centres below the up-tubes due to the particle effects having to be so tall, (they themselves cannot be triggered, I'm reliably told).


Thanks! I really appreciate the time you've already taken to read this post, thank you! :)

Long live Unreal Tournament!
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Re: Special Entry & Exit Trigger. Does something like this a

Post by PrinceOfFunky »

I would call it a hub, something like this:
ILKj75FalBc
I made it before I knew how to code, today I would code it instead, but it was pretty fun and challenging :D

Also, for what you're trying to do, if I remember good a SpecialEvent should be able to play a sound to one client only.
"Your stuff is known to be buggy and unfinished/not properly tested"
User avatar
R3plicant
Experienced
Posts: 93
Joined: Sat Jul 21, 2018 1:31 am

Re: Special Entry & Exit Trigger. Does something like this a

Post by R3plicant »

Hi Prince of Funky,

I wasn't sure if your video was meant to have sound, if it did, it failed. I SAW the basics of what I THINK you were trying to convey, but still, I'm pretty sure it'd not quite be what I need. I couldn't trust a coder to get his/her code right, who couldn't get sound into his/her videos even if you MIGHT understand what it is I'm looking to achieve; though I kinda think you don't, fully. ;) Sorry. I do know though that a Special Event can play sounds to the instigator only, but that's only a small aspect of what needs doing in my map compared to the over-all scenario.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Special Entry & Exit Trigger. Does something like this a

Post by Barbie »

I didn't fully understand your setup, but I think you want a mover that fires an event when it has finished opening and when it has finished closing, too. The former is build in with the default Event. The latter can be realized with a custom mover by overriding function FinishedClosing() that fires an additional event.
when up to 8 players are all scrambling to enter the zone at the same time
The engine keeps track of touching actors until four only.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
R3plicant
Experienced
Posts: 93
Joined: Sat Jul 21, 2018 1:31 am

Re: Special Entry & Exit Trigger. Does something like this a

Post by R3plicant »

Barbie wrote:I didn't fully understand your setup, but I think you want a mover that fires an event when it has finished opening and when it has finished closing, too. The former is build in with the default Event. The latter can be realized with a custom mover by overriding function FinishedClosing() that fires an additional event.
Hi Barbie, thanks for the response. 8) I need a special actor that when activated, triggers movers X & Y to Open (timed separately, not together) then plays sound A,.. then when deactivated, triggers X & Y to Closed and then plays sound B. The actor must not reactivate the movers (Open or Close) if another player (or players) enters its radius and ALSO only plays the sounds (A or B) to the player who instigated the activations (on and off). If the movers are at their Open position and a new player enters the special actors radius, the new player should only hear sound A,. and then only hear sound B when they exit it (i.e stepping back away from the radius) - the movers should stay Open if there's someone already in the special actor's radius.

It'd be nice if it also triggered the trigger lights; the X and Y movers both have their own coloured lights (not attached) which change from off to on depending which mover (and their relevant attached coloured effect) are visible to the player/s.

Barbie wrote:
R3plicant wrote:when up to 8 players are all scrambling to enter the zone at the same time.
The engine keeps track of touching actors until four only.
If indeed the engine only keeps track of up to 4 touching actors, then that's kinda ok, isn't it? As soon as one player has 'shot' up into the teleportation tube, a new player can be tracked when/if they're inside the special trigger's radius, right? Or could this significantly slow down the flow of players? Could this limitation be over-ridden to allow up to 8 (assuming it was necessary to help keep the spawn room player-flow fast and smooth as they enter the special actor's radius and then each leap up the teleportation tube)?
User avatar
R3plicant
Experienced
Posts: 93
Joined: Sat Jul 21, 2018 1:31 am

Re: Special Entry & Exit Trigger. Does something like this a

Post by R3plicant »

Barbie wrote:I didn't fully understand your setup, but I think you want a mover that fires an event when it has finished opening and when it has finished closing, too. The former is build in with the default Event. The latter can be realized with a custom mover by overriding function FinishedClosing() that fires an additional event.
when up to 8 players are all scrambling to enter the zone at the same time
The engine keeps track of touching actors until four only.
Barbie wrote:I didn't fully understand your setup, but I think you want a mover that fires an event when it has finished opening and when it has finished closing, too. The former is build in with the default Event. The latter can be realized with a custom mover by overriding function FinishedClosing() that fires an additional event.
when up to 8 players are all scrambling to enter the zone at the same time
The engine keeps track of touching actors until four only.
Hi again Barbie,

Where can I get the code to create a custom mover as you suggested? Could it be modified still further so it can also trigger the lights, editable in the same part of the actor's property in the 'Trigger Control' manner (Activate lights and movers at the same time (for on and off each light/effect, I mean)). The effects need perfectly timed lights (Trigger Control, I mean), to help create the illusion they're emitting light when they're on and turning off at the exact right time the effects disappear from view. I can't quite explain it here, it's not quite as simple as I've made out, you'd need to see the spawn halls in the map and chat with me in real time for you to see and for me to perfectly explain what was exactly needed so it worked properly every time when coded/implemented.


Incidentally, the map as it is now has the set up so that it's timed,.. and the over-all effect isn't working,.. if I step outside the triggers for the light or the movers (and their attached visual effects) the effect fails, one light stays on and the effect stops too early; basically, it can't do it with what's available to me at the moment. Ultimately, I need the white visual effect to come on earlier than the coloured effects (red and blue for each bases' spawn halls) and the sounds to play at the correct times in relation to the effects. ALSO, there needs to be 3 or 4 parts for the actor to trigger 3 or 4 different movers and the lights in unison, (effect, sounds and the kicker) The kicker is attached to a mover and taken away from the pad so that the pad DOES become useless when the trigger hasn't been set off. At the moment, I can walk on the pad when it's active and get kicked upward,.. and I can also step on the pad when the kicker is hidden,. no kick. :rock: I just need the rest of it all to work seamlessly to perfect the teleportation tube illusion.

They all need to work together,... effects and their respective lights, at different times (White light/effect on/off and Blue/Red light/effect on/off). It's also imperative that the player can SEE/HEAR they're the ones controlling the effects and sounds,.. if not, it just gets very confusing.

Player enters trigger radius > White effect and white light come on together. > Player gets closer to the teleportation tube > Red effect/light also comes on together > Sound A plays "Access Permitted!" > Player walks onto kicker and gets kicked into the tube and into the teleporter itself > if no one else in triggers radius, then the whole system is reset (effects and their respective lights disappear from view and sound B plays "Access Denied". Both sounds must only be audible to the instigating player, no one else.


Another thing, it seems that as the whole effect relies on 'Trigger Control', (as opposed to 'Trigger Open Timed') then the trigger needs TWO editable collision radii,.. one for the white effect and one for the coloured effects.

You see how complex this is? :mrgreen: :omfg: I'm genuinely surprised my brain can keep up with it,. well, BARELY. :omfg: :mrgreen:

Here're some pictures to help you get an idea what's in front of you as you spawn into the teleportation halls:


Image
JUST spawned,. the door opens and you walk in.


Image
You see the teleportation up-tube thingy in front of you.


Image
You get to the trigger's radius and you see the white effect show.


Image
Step closer and then the red (or blue) effect appears, kicker arrives on the pad and sound A plays: "Access Permitted" to instigating player.


Does that help? :highfive:
User avatar
Hellkeeper
Inhuman
Posts: 903
Joined: Tue Feb 25, 2014 12:32 pm
Personal rank: Soulless Automaton
Location: France
Contact:

Re: Special Entry & Exit Trigger. Does something like this a

Post by Hellkeeper »

Did you ever play War§ow? Your maps looks like a War§ow map, the textures have the same style.
You must construct additional pylons.
User avatar
R3plicant
Experienced
Posts: 93
Joined: Sat Jul 21, 2018 1:31 am

Re: Special Entry & Exit Trigger. Does something like this a

Post by R3plicant »

Hellkeeper wrote:Did you ever play War§ow? Your maps looks like a War§ow map, the textures have the same style.
I've never seen nor played it, (had to look for videos of it to see what you were referring to) and I can see why you see the resemblance, but the two styles are not the same. Now, can we please keep this thread on-topic, thanks. :wth:
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Special Entry & Exit Trigger. Does something like this a

Post by papercoffee »

R3plicant wrote:Now, can we please keep this thread on-topic, thanks. :wth:
There, there ...just one post outside the subject area. No reason to lose your temper. :wink:
User avatar
R3plicant
Experienced
Posts: 93
Joined: Sat Jul 21, 2018 1:31 am

Re: Special Entry & Exit Trigger. Does something like this a

Post by R3plicant »

papercoffee wrote:
R3plicant wrote:Now, can we please keep this thread on-topic, thanks. :wth:
There, there ...just one post outside the subject area. No reason to lose your temper. :wink:
No, no, you're right,.. Sorry, I just don't like losing the flow. All calm now. :)
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Special Entry & Exit Trigger. Does something like this a

Post by Barbie »

R3plicant wrote:Where can I get the code to create a custom mover as you suggested?
See attached map: It has a custom Mover that also fires an Event when it has closed.

You can use this mover by opening the test map (the custom mover is loaded into memory) and then opening your map without closing UnrealEd meanwhile. All objects (custom mover included) remain in memory and can be used. To add the mover, right click on the button for adding movers and select "MoverWithCloseEvent".
AddMover.jpg
AddMover.jpg (56.59 KiB) Viewed 2207 times
Then enter the name of the desired event at property "ClosedEvent" in mover's "Events" section.
Attachments
Screenshot for test map XD
Screenshot for test map XD
TestMoverCloseEvent.unr.7z
Map with a custom mover that fires an event after it has closed
(3.43 KiB) Downloaded 64 times
Last edited by Barbie on Tue Jul 24, 2018 8:03 pm, edited 1 time in total.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
R3plicant
Experienced
Posts: 93
Joined: Sat Jul 21, 2018 1:31 am

Re: Special Entry & Exit Trigger. Does something like this a

Post by R3plicant »

Barbie wrote:
R3plicant wrote:Where can I get the code to create a custom mover as you suggested?
See attached map: It has a custom Mover that also fires an Event when it has closed.

You can use this mover by opening the test map (the custom mover is loaded into memory) and than opening your map without closing UnrealEd meanwhile. All objects (custom mover included) remain in memory and can be used. To add the mover, right click on the button for adding movers and select "MoverWithCloseEvent".
AddMover.jpg
Then enter the name of the desired event at property "ClosedEvent" in mover's "Events" section.
Thank you. :) I'm currently testing it now to get it work with all the other actors (special events, triggers, trigger lights, movers) to get the complete desired effect. I see how you've made it function, but given the actors I have to get working, with their relevant visual effect attachments and such, it's proving very hard to get set up so the visual and auditory elements all happen at the right time (in the Trigger Control set-up). I'll get back to you if I need any further help. Thank you so much for the help thus far, much appreciated. :) :tu:

*EDIT* So far,. more than 2 hours later and I only have the sounds playing in the right sequence,. but because of the attach tags being the same as the movers and their corresponding triggers' Events, none of the effects are moving. :confused2: :confused2: :confused2:

The 2 triggers (different radii to set off 4 x Special Events sounds at the right times - similar times as the 2 different effects come into and out of view) set off 2 different movers,.. 1 mover has 1 effect attached to it (same tag as its trigger's Event, there's no other way that I can immediately think of), AND it sets off the 2 sounds (Sound A and beep on),.. THE OTHER mover has 1 (other) effect attached to it (same tag as its trigger's Event), but these movers are both refusing to move, (yes, all other settings are ok, they moved BEFORE I set the attachment tags),. so,. yeah,. problems,. and it's all seriously confusing. :( My brain's turned into slushy spaghetti. :(

Plus, the trigger lights aren't working properly either, they're both set to 'Initially Off', but well before I have entered the radius of the first trigger I used for them, they're already ON and don't go off,. like,. :omfg: :ironic: :ironic: :ironic: :ironic2: :ironic2:

In short, I'm utterly lost.

*EDIT 2*

Ok, so I have movers moving effects and sounds playing ok (just gotta reverse the no access beep and the "Access Denied" sounds with each other,. but the trigger lights aren't working. Stay tuned, I HOPE to get these lights fixed,.. soon.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Special Entry & Exit Trigger. Does something like this a

Post by Barbie »

R3plicant wrote:because of the attach tags being the same as the movers and their corresponding triggers' Events,
Can't you use Dispatcher then?
R3plicant wrote:none of the effects are moving.
When you got that working, try it on net play. I bet it won't work out of the box there because of replication and/or static/bNoDelete settings... :evil:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Special Entry & Exit Trigger. Does something like this a

Post by sektor2111 »

I was intended to ask this first time: Why do we need another Mover since a Dispatcher in timing with mover does the right triggering.
I have not see yet a Dispatcher failing events so far if it's correctly set. I this case I just need to understand what Event must do where and how, more exactly what is supposed to happen here and when, who touch what and what's the Event. This is my confusion not triggering. By any matter if stock is poor at some point a custom actor can be written for doing the right thing.

According to "TriggeredLight" problems I have done settings to such actors not in a single map - EVERYTHING working. Take in account "InitialState" and do READ their scripts, no magic will happen assumptions based. Their TAG should match whatever Event coming from another actor, etc.

Do more Events are required for a Mover ? Reinventing wheel is probably USELESS. Take a look at this stock treasure - it's called GradualMover
[attachment=0]WayMoreEvents.PNG[/attachment]
Eh ?
Attachments
WayMoreEvents.PNG
Last edited by sektor2111 on Tue Jul 24, 2018 10:09 pm, edited 2 times in total.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Special Entry & Exit Trigger. Does something like this a

Post by Barbie »

sektor2111 wrote:Why do we need another Mover
What I have experienced concerning event driven programs: each action should have four events, ActionStarting (before actions starts), ActionStarted (just after action has started), ActionEnding (before action ends) and ActionEnded (after action has ended. The stock Mover in Unreal supports only one of these ("MoverOpened").
sektor2111 wrote:TriggeredLight [...] Take in account "InitialState"
Haha, I run into that trap multiple times. :mad2:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply