Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Lycaon

How do I make an ingame dialog preventing player movement?

Recommended Posts

Hello everyone, this is my first post.

So, I've been working on a map recently and I need a dialog in which the player is forced to look in a certain direction and stay still until it's through. I'd like to do this without having to become a professional ACS programmer, I can only handle some basic stuff, so I'd thank any tutorial link you can give me or simple explanations.

In case you need more details, here is what I need to happen: the player walks into a room and the dialog begins as he nears a nearly dead marine. For the time the dialog lasts, the player shouldn't be able to move, shoot, or look around (Although I can do without this very last part). I have the dialog scripted and it works, but that's all.

I will post more information about this project as it unfolds, I think some of you might find it interesting.

Thanks in advance!

Share this post


Link to post

Hmmm, not sure, but try this:

SetPlayerProperty(1, 1, PROP_TOTALLYFROZEN);

to end the frozen state:

SetPlayerProperty(1, 0, PROP_TOTALLYFROZEN);

note that i'm not 100% sure about it, it's been a long time since I write some ACS, but try it out

Share this post


Link to post

Use SetPlayerProperty ACS function.

SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);  // This line will freeze the player so that he cannot move, look around or shoot

SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);  // This line will unfreeze the player
Also see here, if you want to change the position of "player's camera" during the dialogue: ChangeCamera

ACS is easy. ;)


EDIT: I was ninjaed. But Ledillman is slightly wrong, the first parameter of SetPlayerProperty should be 0 to affect just the one player. If it was 1, the freeze would affect all players (during multiplayer), and I guess it's not desired.

Share this post


Link to post

Oh, right! I forgot about it lol.
Well, just write 0 in the first parameter and it should be fine

Share this post


Link to post

Thanks, I will try that. I'm not gonna overuse this since I know this is Doom and not Call Of Duty, but it's a nice way to introduce the storyline.

Share this post


Link to post
Lycaon said:

I'm not gonna overuse this since I know this is Doom and not Call Of Duty

Alright. That reminds me, keep in mind that the frozen player can still press "use" button. Great opportunity to make the cutscene skippable. ;) To achieve it, you'll have to place a linedef in front of the player, which (when pressed) will unfreeze the player and terminate the cutscene script. Or perhaps you'd use it to advance through the dialogue by pressing "use", instead of a timed text.

Share this post


Link to post

I'll keep that in mind, thanks again!

Edit: The ChangeCamera doesn't allow me to choose a view angle for the player, so I made it so that the cutscene starts right in the beggining, but I would rather place the other marine on a corner and make the player turn and look at him directly and then start the dialog, but I've never seen this in any map so I'm guessing it is impossible. Anyways the main idea is done.

Share this post


Link to post

What you describe is possible.

ChangeCamera is supposed to be used along with tagged map spots (or cameras) placed in the map.

To change player's angle during the game: SetActorAngle (horizontal angle), SetActorPitch (up/down angle)

To change his position (if needed), you can use SetActorPosition or script-activated silent teleporting.

ZDoom wiki is a very useful source of information regarding ACS and other ZDoom-specific features. I can recommend searching there if you have problems with implementing what you want.

Share this post


Link to post

Well you've been really helpful. Yes, I've been waging through many articles on that wikia lately, but there's so much terrain to cover. I got that "skip" thing working with a nice "Press E to Skip" fading in Hud Message... This is turning out better than I expected. I'll post screenshots as soon as the mapping is more detailed.

Share this post


Link to post
Lycaon said:

.....through many articles on that wikia lately, .....

Heads-Up:
It's been a few years since the transition, which means that Wikia is not up-to-date with many articles.
Use http://doomwiki.org/wiki/Entryway instead.

Backstory:
http://www.doomworld.com/vb/doom-general/67741-doom-wiki-transition-post-mortem/

And as already mentioned, use the ZDoomWiki for ZDoom specific topics.

Share this post


Link to post

Oh well I was only reading about ACS so I guess it's ok.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×