Placing a teleporter under a 3D floor.

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Placing a teleporter under a 3D floor.

Re: Placing a teleporter under a 3D floor.

by Amuscaria » Fri Dec 15, 2017 2:51 pm

Wow, had no idea that was even in the game.

Re: Placing a teleporter under a 3D floor.

by Gez » Fri Dec 15, 2017 2:43 pm

You use +[wiki=Actor_flags#BUMPSPECIAL]BUMPSPECIAL[/wiki] if you want to run a script on bumping.

For specific states, that's only for Switchable or SwitchingDecoration with the [wiki]Activation[/wiki] property set accordingly.

Re: Placing a teleporter under a 3D floor.

by Amuscaria » Fri Dec 15, 2017 2:24 pm

ramon.dexter wrote:Bump method
How do I use the bump to activate an actor special, exactly? For some reason I thought there was a State specifically for when you bump into an actor, but looking thru the documentation it wasn't there. Must be remembering things wrong.

Thinking about using a script like this, otherwise:

Code: Select all

Script 1 (void)
{
   If(GetActorZ(0) < 128 ) //the 3D floor is 128 units high and doesn't move
   {
       Warp (15); //teleport destination tagged 15
       Spawn("GreenTeleFire");
   }
}

Re: Placing a teleporter under a 3D floor.

by Graf Zahl » Sat Dec 09, 2017 2:05 pm

ramon.dexter wrote: Hi Graf, sorry to ask, but can you explain to me, what is exactly 'hacky' in this approach? Action special could be connected to actor, that is 100% legit approach and I really dont see how it could break anyhting. Also, it could leave the height check on the engine, without any supporting coding (like checking for palyers height). I just dont see any 'hack' approach in this. Just a little irregular approach, but nothing more.

(I'm asking because explanaition like "Don't" is not explanatory enough for me.)
The obvious problem with this approach is that it requires a collision to occur. And unlike crossing a linedef that's NOT something without immediate side effects - and teleporters are the most susceptible thing in the entire engine when it comes to side effects - because the teleport action is being performed in the middle of movement and not queued to occur at the end of the frame. So the collision can have some subtle effects on the teleport that would make it feel 'wrong' - or even something worse.

We already had situations where trying to use teleports with sector actions and other non-standard triggers did not work as expected.

Re: Placing a teleporter under a 3D floor.

by AFADoomer » Sat Dec 09, 2017 11:34 am

Arctangent wrote:
ramon.dexter wrote:Hi Graf, sorry to ask, but can you explain to me, what is exactly 'hacky' in this approach?
You're replacing a trigger based around walking over a non-solid line with bumping into a solid actor. That alone should really illustrate how hacky this method is, but you also need to keep in mind that walk-over line specials don't trigger based on bounding boxes - they only trigger when the actor's center crosses the line. So actor collisions don't exactly make a good approximation, considering they're entirely based around bounding boxes.
You can "touch" a non-solid actor... And, besides being able to do z-height checks, the actor can be set up to trigger actions based on the horizontal distance between it's center and the bumpee/activator. If you have an action that should only take place when the player is within a certain radius of a specific point, then this gives you far better control than approximating the circle around the point with lines... Plus, if needed, you can write your own ZScript-based actions instead of relying on line specials or ACS.

Re: Placing a teleporter under a 3D floor.

by phantombeta » Sat Dec 09, 2017 8:20 am

Gez wrote:What if you need to change the 3D floor's height for some reason and forget to update the script? Heck, what if the 3D floor moves up and down?
You give the control sector a tag and use GetSectorCeilingZ and GetSectorFloorZ to check its height. :P
I wonder if CheckSwitchRange would do anything to teleport lines... Probably not, but worth checking, I guess...

Re: Placing a teleporter under a 3D floor.

by Arctangent » Sat Dec 09, 2017 8:14 am

ramon.dexter wrote:Hi Graf, sorry to ask, but can you explain to me, what is exactly 'hacky' in this approach?
You're replacing a trigger based around walking over a non-solid line with bumping into a solid actor. That alone should really illustrate how hacky this method is, but you also need to keep in mind that walk-over line specials don't trigger based on bounding boxes - they only trigger when the actor's center crosses the line. So actor collisions don't exactly make a good approximation, considering they're entirely based around bounding boxes.

Re: Placing a teleporter under a 3D floor.

by Gez » Sat Dec 09, 2017 8:00 am

Graf Zahl wrote:Regarding the other suggestions: Why are they even being made? The goal here is clear: You want to restrict the height at which the action triggers. So implement something that checks the position of the triggering object! Everything else is working around the issue.
And replacing a teleport action with a script action so that you can do the check isn't a hack or a workaround? :P

What if you need to change the 3D floor's height for some reason and forget to update the script? Heck, what if the 3D floor moves up and down?

Re: Placing a teleporter under a 3D floor.

by ramon.dexter » Sat Dec 09, 2017 2:42 am

Graf Zahl wrote:
Amuscaria wrote:Thanks. I'll just use something else.

EDIT:
ramon.dexter wrote:And what about connecting the teleport linedef action to a invisible actor and then trigger that action when player bumps this invisible actor?
That might work. Gonna test it out.
One piece of advice: Don't!
If you implement a hack, don't be surprised if it glitches a few years down the line, in case some quirk changes.


Regarding the other suggestions: Why are they even being made? The goal here is clear: You want to restrict the height at which the action triggers. So implement something that checks the position of the triggering object! Everything else is working around the issue.
Hi Graf, sorry to ask, but can you explain to me, what is exactly 'hacky' in this approach? Action special could be connected to actor, that is 100% legit approach and I really dont see how it could break anyhting. Also, it could leave the height check on the engine, without any supporting coding (like checking for palyers height). I just dont see any 'hack' approach in this. Just a little irregular approach, but nothing more.

(I'm asking because explanaition like "Don't" is not explanatory enough for me.)

Re: Placing a teleporter under a 3D floor.

by Nash » Sat Dec 09, 2017 2:22 am

The only little nuisance by implementing height checks in the script is you need to provide an absolute Z coordinate to check against, and if for whatever reason the map's floor height is altered, you'd have to recompile the script...

Re: Placing a teleporter under a 3D floor.

by Graf Zahl » Sat Dec 09, 2017 2:16 am

Amuscaria wrote:Thanks. I'll just use something else.

EDIT:
ramon.dexter wrote:And what about connecting the teleport linedef action to a invisible actor and then trigger that action when player bumps this invisible actor?
That might work. Gonna test it out.
One piece of advice: Don't!
If you implement a hack, don't be surprised if it glitches a few years down the line, in case some quirk changes.


Regarding the other suggestions: Why are they even being made? The goal here is clear: You want to restrict the height at which the action triggers. So implement something that checks the position of the triggering object! Everything else is working around the issue.

Re: Placing a teleporter under a 3D floor.

by Amuscaria » Sat Dec 09, 2017 12:39 am

Gez wrote:What happens if you use a sector action: player enters sector on a 3D floor's control sector?
I'm unfamiliar with sector actions.

Re: Placing a teleporter under a 3D floor.

by Gez » Thu Dec 07, 2017 12:54 pm

What happens if you use a sector action: player enters sector on a 3D floor's control sector?

Re: Placing a teleporter under a 3D floor.

by Amuscaria » Thu Dec 07, 2017 11:58 am

Thanks. I'll just use something else.

EDIT:
ramon.dexter wrote:And what about connecting the teleport linedef action to a invisible actor and then trigger that action when player bumps this invisible actor?
That might work. Gonna test it out.

Re: Placing a teleporter under a 3D floor.

by ramon.dexter » Thu Dec 07, 2017 4:56 am

And what about connecting the teleport linedef action to a invisible actor and then trigger that action when player bumps this invisible actor?

Top