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

I'm at it again but really I need help with this.

Recommended Posts

Since you used my exact example, the marine will be almost identical to the regular one, just with weapons that you don't have and thus won't work correctly if played. You might as well just use the default marine for now.

 

Player start is only for player controlled actors, you have to have someone controlling them, otherwise they won't do anything or even appear. One player for each actor. If you want to have a marine controlled by a script as described above, you can use the marines already present in UDB, they work like monsters.

Share this post


Link to post

'Player start' is not an actor, it marks the place where player starts. You have to define this said actor as simple actor, not player.

You cannot animate player, because it relies on player controls.

Share this post


Link to post

Oh, okay, so I'm assuming I give say an Imp [For Example] A tag in order to give him a script right? Or is a different method used? 

Share this post


Link to post

Yes, that's it. You can give a tag to any non-player actor and then use that in a script to make it do some action.

 

 

Share this post


Link to post

So do I just give a Marine [The Ones That Act Like Monsters] A Tag? Or do I have to write new code?

Share this post


Link to post
23 hours ago, Rifleman said:

Yes, that's it. You can give a tag to any non-player actor and then use that in a script to make it do some action.

 

 

Yes.

Share this post


Link to post

You only need to write new code if the stock actors are not enough for you or if you need to change them somehow.

 

If you want to control an actor with a script, you should give it a tag. Many action functions refer to that number. The same goes for cameras, too - in order to switch to another camera it needs a tag.

Share this post


Link to post
Posted (edited)

Okay, so I gave the Pistol Marine tag 2 since tag 1 is already being used, and the actor itself didn't use the script that assigned properties. 

 

 

Here is the code being used 

 

Do I need to change it for non-player actors? 

S!1.png

S@.png

Share this post


Link to post

You really dont even understamd what we are telling you. So, again: You cannot use player as an actor! Player depends on player controls, therefore it will not move! Clear? You have to define your own new actor. If you want the actor to look like player, use the player sprites. But define a completely new actor. Understand?

Share this post


Link to post

I asked if I needed to change the code I was told no. And I sent these pictures earlier in the conversation. Okay, so I need to write code that defines another actor right? I'm using the Marine that comes in the UDB UDMF Format so how would I define him in code? 

Share this post


Link to post

We seem to be moving in circles here, so I'll try once more:

 

To have moving actors in a cutscene you can either use computer controlled actor(usually a monster, or it can be the marines from editor) or a player actor. 

 

If you use monsters, and want them to behave different from normal, you will need to use scripts(to for example activate, move them they way they don't, teleport them or kill them) or change the actor definition(if you want for example a BFG firing imp).

 

If you use a player, it works differently. You can change the code too, but it won't change any behaviour - as it has to be controlled by a player. No player - no action. you can of course change stuff like the sprites, or speed or health of it. But no amount of scripting will make it do anything. 

 

Of course, you can use a combination of both methods. You can walk around and interact and record that with your cameras. I'd forget about making custom actors for now and just focus on the basics here. Try making a small map, put a few things in it and try it out with stock assets. If you do that, it'll be easier to make more complex cutscenes.

Share this post


Link to post

Yes, I already have a small Map for use. I wanna know how to move a Marine from one end of the room to the other and how to set up the actor itself. 

Entryway - DOOM 2_ Hell on Earth 10_9_2021 1_47_31 AM.png

Share this post


Link to post
Posted (edited)

I guess the best example of what I'm trying to do would be this. [Doom - Golden egg - YouTube] Just not as complicated. 

 

EDIT: For right now I want to know how to set up and move one actor. But after that, I need to know how to set up and move multiple actors. 

Edited by Player T

Share this post


Link to post

Since this is a simple scenario, you can just play the role yourself - just walk down the hallway and turn around as you need. The cameras will see the marine. This is the method GG uses in that video and others as far as I know...if you want to make the marine look different, I wrote about that at the starts of the thread.

 

Otherwise check my last post from October 2 on the previous page - it links to video that explains how to make non-players follow a path.

Share this post


Link to post

Hey, I should mention it may be a bit before I comment here again. I'm moving out and I gotta focus on that, but I wanted to tell you that I'm going to send a design document on what I'm planning on doing with this animation. That should be some time within the next month or so. 

Share this post


Link to post

Okay, I'm back. So I need to move 4 Marine from one end of the room to the other. The Marines have been placed down in the Level, all I need to know is how I can move them. Btw The Marines are the ones that function like monsters. 

Share this post


Link to post

Okay, I followed what he said and I got the actors to move. But I'm not done yet, I need to know a couple of other things. One, how do I change the colors of the Marines? Two, how do I change their colors and sprites? [For that one I'm using a skin pack that contains alternate Doomguy skins where he is holding different weapons] and third, how do I get them to stop moving after they move from one point to another? 

Share this post


Link to post

You can recolour the sprites themselves, but if you want each to be a different colour while using a single model you'll need the translation string. You can get that in Slade - you change the colours as you like and copy the string. The example shows turning green marine to gray.
image.png.f8c9d41921170080cfb1f6771bfb1f5d.png

 

There are several ways you can use that; in script you can use it like this:

 

script "MarineColours" OPEN

{

      CreateTranslation (number, 112:127=96:111);

      Thing_SetTranslation(actor tag, number);

}

 

To change the sprites completely you either can rename them to be the same names as the default sprites or you can rewrite the actor states, that's something I posted before, check the thread.

To stop the actor and make it non-moving, you can use Thing_Stop and Thing_Deactivate. For other options of controlling actors check:

https://zdoom.org/wiki/Action_specials#Things

https://zdoom.org/wiki/Built-in_ACS_functions#Actor_control

 

Edited by Rifleman

Share this post


Link to post

Okay, so what file do I put the text in? Scripts Decorate or? And also, for the line (actor tag, number); Is the number part referring to the colors? 

Share this post


Link to post

Text for what? Maybe if you are more descriptive on what you want to do, we can give you better advices.

And no, actor tag is not any referrence for colors(how did you concluded that?). Its just a tag that allows referring for that said actor.

Share this post


Link to post

No, the number is just a number you want to give the colour translation to be able to use it with the second command.

 

If by text you mean the example script, it goes into Script Editor in UDB. I mentioned that earlier in the thread(Sep 27), so please consider going through it from the top. Also, no need to reply with just OK or such, it just makes the already long thread longer...use the Soulsphere button for that :)

Share this post


Link to post

I was asking if I had to put the actor tag and then a color number in this line [Thing_SetTranslation(actor tag, number);] So far I've got this. What should I do? 

Script Editor 10_19_2021 5_28_20 PM.png

Share this post


Link to post

In that line you put in the actor tag and then the number of the translation - the one you created one line above, but didn't assign a number.

 

You may have noticed I often link to ZDoom wiki - all these functions are described there, often with examples, I suggest you keep that open while editing.

Share this post


Link to post

Ok, so I was able to get the colors working, although I do need the TranslationString for the Bright Red color. So the next and final thing I need to learn is how to change the Sprites of individual Actors. What I mean by this is that I want one Marine to be holding a shotgun while the others are either holding rifles or other weapons. 

Edited by Player T

Share this post


Link to post

Then use Slade as shown above - select your sprites, right-click > Graphics > Color remap and select green color in the top box and then select replacement color in the bottom one. Experiment.

 

As said before, you need to either have the sprites with same names as your actor currently uses or you have to rewrite their states. First, read up on sprites to understand the naming. 

 

Spawn:

TROO AB 10 A_Look

Loop

 

This is for example spawn state for a Doom imp. The sprites it uses are named TROOA* and TROOB* (the asterisk is for numbers). So if your new imp sprites names are XXXXA* and XXXXB* you change it to this. Note that you don't enter the number from the sprites name. The number after the name is for how many tics each of these sprites are shown.

 

Spawn:

XXXX AB 10 A_Look

Loop

 

The rest of the links about actor modification are in the thread.

 

Also, earlier you said you had downloaded some custom marine pack, so you can not only check their definitions in Slade, but you can also just load that pack as external resource in UDB(Edit > Map Options) and use them in your map directly.

 

 

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
×