Would this be possible?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Enjay
 
 
Posts: 27307
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

It has a set action of running a script and is set to run script 1? Then one of its arguments must be set to 1. The argument that tells it to run script 1, specifically. That's your problem right there. Remove the special and the thing arguments.

AFAIK, there is no point in giving a player start a special action.
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

Hm...?
Enjay wrote:Remove the special and the thing arguments.

AFAIK, there is no poing in giving a player start a special action.
Zippy wrote:Have the player activate a script and then use Thing_ChangeTID( 0, ### ). The 0 specifies that the activator should have its TID changed (in this case, the player) to whatever TID number you put for ###.

The simplest place to do this would be in an ENTER script.

Code: Select all

script 5 ENTER { 
    Thing_ChangeTID( 0, 1234 ); 
}
Which is right here??

The script I am using to change the player's TID is this:

Code: Select all

script 1 ENTER
{
	Thing_ChangeTID(0, 0001);
}
So.... what am I doing wrong?? :/
farlowj
Posts: 389
Joined: Mon Feb 16, 2004 1:33 pm
Location: Michigan

Post by farlowj »

I think what they are trying to say is, do not have the player start activate a script, have it do nothing, no arguments or anything, then run the script that zippy wrote. Is that what you guys meant?
User avatar
Enjay
 
 
Posts: 27307
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Yes, exactly.

Neither what Zippy or I said is wrong. Zippy has told you to use an enter script. This is a script that is run automatically by the player when he starts the map. It does not need to be allocated to the player start. The key word "enter" in your script is enough to make it run automatically. The player start should not have a special or any arguments. The enter script will run and will allocate a tid to the player - not the start spot, but the player.
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

[EDIT]

Okay, but then would that work for more than one player, the same way? Or perhaps a different way? Anyway I got it to work in single-player nonetheless.
User avatar
Enjay
 
 
Posts: 27307
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

I'm not sure of the syntax myself, but each player has a player number, so get that and use to create the player tids.
Caligari_87 in another thread entirely wrote:Put an ENTER script with the line thing_changetid(0,1000+playernumber()); I think that's the right syntax.

This will make the activator (the player) have a tid of 1000+the player's number, so player 1 would be 1000, player 2, 1001, etc.

Use enter, not open, because enter is activated by each player, whereas open is activated by the map itself.

8-)
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

I'll try that...

...and it seems to work. Although (very n00bish still) I don't know exactly how to network a game with ZDoom. :p

Still, logically since it works with player 1 it *should* work with all players.
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

[EDIT]

Nevermind, I have figured it all out by looking at grbtest in the test folder of 2.0.96x. (Thank you Grubber! I thought I would need to reference that level at some point. :D)
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

Very sorry for triple-posting but I've run into another problem. I added a texture in ANIMDEFS using XWE and named it CAMERA1, and added this script:

Code: Select all

script 7 OPEN
{
     SetCameraToTexture(9072, "CAMERA1", 90);
}
As it should be, and I set the texture to the wall to CAMERA1. All those steps are complete. HOWEVER, there is one crucial part missing: the "length x height fit length x height". I know I want it fit to 128x64, but I just can't seem to figure out what to fit it from. I've checked ANIMDEFS, grbtest.wad and even Daedalus, but with no avail. How should I figure out the length x height of the camera view?
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow
Contact:

Post by Costja »

Without fit keyword a texture size will be equal to a camera resolution (which is defined by first width and height args). With fit keyword a texture size is defined by fitwidth and fitheight args
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

Sorry that I'm being slow but I'm still waking up, but did you mean something like this

Code: Select all

cameratexture CAMTEX ## ## fit ## ##
or something else?
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow
Contact:

Post by Costja »

Yes, I mean that.
"fit ## ##" part is optional.
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

Well, I think I need the "fit # #" part, because I want it to go on a texture that is 128x64 pixels. However, the problem I'm having is figuring out the "CAMTEX # #" part. No matter what I put in there, I can't get it to work. If you have 2.0.96x and XWE (or a similar program), and open up grbtest.wad, it says:

Code: Select all

cameratexture CAMTEX 128 96 fit 64 48
My question is, where did the "128 96" come from, and how is that figured out? Because I've tried everything, and can't get it to work. Currently, my line of code in ANIMDEFS is basically this (not literally, but this represents the problem):

Code: Select all

cameratexture CAMERA1 ??? ??? fit 128 64
So the real issue is finding out what numbers to plug in. So how do I go about finding what those numbers are? :?
Costja
Posts: 188
Joined: Mon Oct 18, 2004 3:58 pm
Location: Russia, Moscow
Contact:

Post by Costja »

cameratexture CAMTEX 128 96 fit 64 48 means (as I understand) display camera image that has resolution 128*96 on CAMTEX-textures that have size 64*48
Do you use setcameratotexture function?

As I understand you can use

Code: Select all

cameratexture CAMERA1 128 64
AFAIK, you can think that FIT ## ## part defines texture size (as for any another texture), by default this size is equal to camera resolution (this default values used if there is no FIT part).

Why do you use 96x build? Cameratextutes already supported by latest official zdoom.
User avatar
ace
Posts: 787
Joined: Tue Jun 21, 2005 10:14 am
Location: Just south of the True North

Post by ace »

As I understand you can use

Code: Select all

cameratexture CAMERA1 128 64
I tried that, but sadly it didn't work.
cameratexture CAMTEX 128 96 fit 64 48 means (as I understand) display camera image that has a resolution 128*96 on CAMTEX-textures that habe size 64*48
Do you use setcameratotexture function?
Yes I do, but I think I may have, just by reading that, the problem with mine. I will add an edit soon saying whether or not it worked, at the bottom.
Why do you use 96x build? Cameratextures already supported by latest official zdoom.
Some mods are 96x only, and I figured I might as well keep it; it seems to work well.




EDIT:
Nope, it didn't work. As I said before, I got an idea from reading this:

"cameratexture CAMTEX 128 96 fit 64 48"

^ Assuming that works (which it does) the texture would be 64*48, and it would be fit from a resolution that is twice its size. So, I put a resolution 2 times the size of the "screen" which is this:

Code: Select all

cameratexture CAMERA1 256 128 fit 128 64
and I get the effect I've gotten the entire time while trying to get this to work, which is this:

Image

And it is quite annoying.
Last edited by ace on Sat Jul 09, 2005 11:32 am, edited 2 times in total.
Locked

Return to “Editing (Archive)”