Would this be possible?
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.
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.
Would this be possible?
Would it be possible to make a script that changes which camera you're looking at on a screen, and how long a time limit is, depending on what skill level you're on (using an IF statement or otherwise)? Or am I just being crazy and unrealistic? 
I thought it would be possible...
See what I'm doing, is I'm going to make a level where you're on a falling air-transport, and you have to get out of it before it's too late. In order to make it look like it's falling, one side of it will have windows of a sky texture scrolling left, the other side scrolling right, the back exit I think I will use some sort of skybox or something, and the front windsheild will have a screen viewing a camera that is zooming in towards a wall that will (hopefully) resemble a ground texture. And then somehow, I will try to sync the video with the time limit (really all depends on the length of the sector) with the time limit so that when the counter hits zero, the camera hits the wall.
Now, for harder skill levels, I will make another sector that is shorter, and make the time limit shorter, so it all is over with faster. This is going to be tough, but it IS possible, right?
See what I'm doing, is I'm going to make a level where you're on a falling air-transport, and you have to get out of it before it's too late. In order to make it look like it's falling, one side of it will have windows of a sky texture scrolling left, the other side scrolling right, the back exit I think I will use some sort of skybox or something, and the front windsheild will have a screen viewing a camera that is zooming in towards a wall that will (hopefully) resemble a ground texture. And then somehow, I will try to sync the video with the time limit (really all depends on the length of the sector) with the time limit so that when the counter hits zero, the camera hits the wall.
Now, for harder skill levels, I will make another sector that is shorter, and make the time limit shorter, so it all is over with faster. This is going to be tough, but it IS possible, right?
I think this is correct:
Code: Select all
script 1 (void)
{
if (gameskill() == SKILL_VERY_EASY)
{
Do stuff;
}
if (gameskill() == SKILL_EASY)
{
Do other stuff;
}
if (gameskill() == SKILL_NORMAL)
{
Do harder stuff;
}
if (gameskill() == SKILL_HARD)
{
Do tough stuff;
}
if (gameskill() == SKILL_VERY_HARD)
{
Do impossible stuff;
}
}Bump. I now tested it out, and I got the time limit for skill_very_easy completed, and it all works fine. It counts down, in the upper right-hand corner, from two minutes, and when it hits "0:00" it is supposed to kill the player(s).
However, it doesn't kill the player(s). Instead, the timer stays at 0:00 for 100000 holdtime, like it should, then clears, but the player(s) don't die. To do this, I used
According to the Wiki Thing_Destroy can kill players, and according to DoomBuilder the TID for Player 1 start is 1. But when I test it... nothing! Am I doing something wrong?
Also, I can't seem to get the SetFont to work. In the script at the beginning I put "SetFont (BIGFONT);" but then it wouldn't compile, saying "the identifier has not been declared." I think I saw on the wiki that the phrases for font are included in zdefs.acs, but when I #include that it gets an error message:
Any help on this as well?
However, it doesn't kill the player(s). Instead, the timer stays at 0:00 for 100000 holdtime, like it should, then clears, but the player(s) don't die. To do this, I used
Code: Select all
script 1 OPEN
{
if (gameskill() == SKILL_VERY_EASY)
{
// a couple hundred lines of timer code
...
Thing_Destroy (1, 0);
}
}Also, I can't seem to get the SetFont to work. In the script at the beginning I put "SetFont (BIGFONT);" but then it wouldn't compile, saying "the identifier has not been declared." I think I saw on the wiki that the phrases for font are included in zdefs.acs, but when I #include that it gets an error message:
Code: Select all
Line 10 in file "zdefs.acs" ...
zdefs.acs:10: Invalid identifier.
> #define TRUE
> ^
The ACS compiler did not compile your script.
Try making your script an enter script rather than a open one. Open scripts are run by the world. Enter scripts are run by the player as he enters.
Also, players can be given tids, but it is not done by giving the start spot a tid, you need to do it via a script. It's been mentioned a few times. I can't remember the syntax but do a search and you should find it.
As for your error messages, my guess is that you don't have this at the start of your script:
#include "zcommon.acs"
Or that the file zcommon.acs and the other z*.acs files are not in the same directory as everything else.
Also, players can be given tids, but it is not done by giving the start spot a tid, you need to do it via a script. It's been mentioned a few times. I can't remember the syntax but do a search and you should find it.
As for your error messages, my guess is that you don't have this at the start of your script:
#include "zcommon.acs"
Or that the file zcommon.acs and the other z*.acs files are not in the same directory as everything else.
- TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
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 ###.ace wrote:Oh... alright then. Also, I found the issue with the BIGFONT line: I forgot to put BIGFONT in quotes, heh.
Still, I can't seem to find anything mentioning how to set the players' TIDs. I found a few *relevant* things, but sadly nothing direct. Any help?
The simplest place to do this would be in an ENTER script.
Code: Select all
script 5 ENTER {
Thing_ChangeTID( 0, 1234 );
}