[ACS] Camera TID? and waiting until player presses use

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Empyre
Zandrone
Posts: 1316
Joined: Sun Jul 08, 2012 6:41 am
Location: Garland, TX, USA

[ACS] Camera TID? and waiting until player presses use

#1

Post by Empyre » Mon May 22, 2017 1:29 am

I want to use ACS to change a player's view to a camera, but the Wiki says that ChangeCamera needs the TID of the camera. I don't know how to find out or set a camera's TID. I have been trying to find the answer in the Wiki, but it appears that it assumes the the reader already knows something as basic as that, so it doesn't tell. This is my first time using UDMF and nearly my first time using ACS.

This might seem like a stupid question, but is the TID the same thing as the Tag I gave the camera in Doom Builder 2?

I am tempted to just stick with linedef action 237: Camera Change, but it confuses some players, who just stand there pressing use and firing their weapon trying to get back to their own camera, when all they need to do is move, and a second problem is some players never stop moving when using the switch, so they never see the camera at all.

Once the TID thing is worked out, I need to figure out how to get the script to wait until the player presses use before switching back to the players own camera. I plan to have the script change to the camera, stop the player's movement (Thing_Stop), make the player totally frozen (PROP_TOTALLYFROZEN), and give the player invulnerability (APROP_Invulnerable), and print a message telling the player to press use, then wait until the player presses use, and then reverse everything, with a three-second delay (105 tics) before reversing the invulnerability, in case the player is in the middle of being attacked.
"For the world is hollow, and I have touched the sky."

User avatar
jdagenet
Forum Regular
Posts: 191
Joined: Tue Jun 05, 2012 8:08 am
Clan: Cube
Clan Tag: A3
Contact:

[ACS] Re: Camera TID? and waiting until player presses use

#2

Post by jdagenet » Mon May 22, 2017 8:15 am

Empyre wrote:I don't know how to find out or set a camera's TID.
Just how you'd give anything else a TID: right-click it, go to the "Action/Tag/Misc" tab and at the very bottom you'll see where you can assign a TID to the camera actor.
Empyre wrote:Once the TID thing is worked out, I need to figure out how to get the script to wait until the player presses use before switching back to the players own camera. I plan to have the script change to the camera, stop the player's movement (Thing_Stop), make the player totally frozen (PROP_TOTALLYFROZEN), and give the player invulnerability (APROP_Invulnerable), and print a message telling the player to press use, then wait until the player presses use, and then reverse everything, with a three-second delay (105 tics) before reversing the invulnerability, in case the player is in the middle of being attacked.
PROP_TOTALLYFROZEN actually gives the player invulnerability automatically, but also prevents them from pressing "use" and doing any other action like that. I'd use a combination of Thing_Stop, PROP_FROZEN, and APROP_INVULNERABLE and constantly check the player's input to see whether they're pressing their use key or not to break out of the camera sequence.
<Dynamo_>uh
<Dynamo_>did you just take the thread away
<FusedQyou>Dunno
<FusedQyou>ask the thread

User avatar
Empyre
Zandrone
Posts: 1316
Joined: Sun Jul 08, 2012 6:41 am
Location: Garland, TX, USA

[ACS] Re: Camera TID? and waiting until player presses use

#3

Post by Empyre » Mon May 22, 2017 2:43 pm

What you're telling me conflicts with what I see in Doom Builder 2 and with what I see in the ZDoom Wiki.

Using ZDoom_DoomUDMF.cfg (dated 5/27/2012) in Doom Builder 2, I only see Properties, Action, and Custom tabs in the Edit Thing dialog box. If I have to change to GZDoom Builder, I will do so very reluctantly. I tried it a while back and didn't like it, but I don't remember specifically why. I could be just that it is different. By the time I finally abandoned Doom Builder for Doom builder 2, GZDoom Builder already existed.

The SetPlayerProperty page in the ZDoom Wiki says:
PROP_TOTALLYFROZEN — Same as PROP_FROZEN, but does not allow the player to look around or shoot. (In fact, the only control they can still use is the “+use” key)
It doesn't mention invulnerability either there or under PROP_FROZEN, but it does say that they can still use the "+use" key. If I used PROP_FROZEN instead, the player would still be able to fire their weapon, which would be undesirable.

It is probably an elementary thing to do, but I am new enough to ACS to not know how to constantly check the player's input to see whether they're pressing their use key.
"For the world is hollow, and I have touched the sky."

User avatar
jdagenet
Forum Regular
Posts: 191
Joined: Tue Jun 05, 2012 8:08 am
Clan: Cube
Clan Tag: A3
Contact:

[ACS] Re: Camera TID? and waiting until player presses use

#4

Post by jdagenet » Mon May 22, 2017 4:06 pm

Oh Interesting, I'm definitely wrong there. Uh in my defense I haven't used player properties in years so... Lol.

Well I haven't used Doom Builder 2 in such a long time, but I don't imagine it being to different when it comes to applying a TID to said thing. Just right-click on the AimingCamera actor (assuming you're even using the right camera actor) and look around for it. It shouldn't be that hard to find.

I made a small demo WAD showing the basics of what you're wanting to do. You can use it as a base or use it as a building block or something to help you better understand player inputs:
https://www.sendspace.com/file/35xwrd
<Dynamo_>uh
<Dynamo_>did you just take the thread away
<FusedQyou>Dunno
<FusedQyou>ask the thread

Post Reply