The "How do I..." Thread
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.
Re: The "How do I..." Thread
Much better. Many thanks, you guys!
Re: The "How do I..." Thread
LogicalFallacy wrote: What I would do for the line is define a universal integer (so outside any scripts) and have the necessary script increment the integer. Then you can have the line's script check if the integer has been incremented and end itself without doing anything if it hasn't.
Example:Code: Select all
int test = 0; script "prereq" (void) { //stuff this script does; test++; } script "LineTeleport" (void) { if (test == 1) { Teleport(/*You know what goes here.*/) } }
Thank you, I'll give that a try!Gez wrote: Not a compatmode, but you can set [wiki]compatibility options[/wiki] in MAPINFO, yes. For instance, if you want things to be infinitely vertical for collisions, add that line in the map definition.Inversely, if you want to make sure it is off, use this line:Code: Select all
compat_nopassover
IIRC that should work.Code: Select all
compat_nopassover = 0

Re: The "How do I..." Thread
Is there any way to have a projectile with the +BLOODSPLATTER flag always spawn blood? As it is, it only does so 2/3rds of the time, and having the projectile directly spawn its own blood using A_SpawnItemEX doesn't take the monster's blood color into account.
Re: The "How do I..." Thread
I'm trying to use the actor state for-loop for the first time:
This sometimes freezes the game (with loads of ricochet sounds coming from the bullet puff actor), and sometimes simply produces no shots fired. What am I doing wrong? I have written "var int user_i;" in the weapon definition.
Code: Select all
Fire:
TNT1 A 0
{
for ( A_SetUserVar(user_i, 0); user_i < 360; A_SetUserVar(user_i, user_i + 45) )
{
A_FireBullets ( user_i, user_i, -1, 10);
}
}
...
- worldendDominator
- Posts: 291
- Joined: Sun May 17, 2015 9:39 am
Re: The "How do I..." Thread
First argument of A_SetUserVar is a string containing uservar name, so you need to put it in quotes.
Re: The "How do I..." Thread
Someone should correct that in the wiki (the for-loop section in actor states - page).
And unfortunately, that didn't solve the problem. But I managed to create another test case where the freeze doesn't occur, so I was able to read an error message:
"VM execution aborted: invalid self pointer".
And unfortunately, that didn't solve the problem. But I managed to create another test case where the freeze doesn't occur, so I was able to read an error message:
"VM execution aborted: invalid self pointer".
- worldendDominator
- Posts: 291
- Joined: Sun May 17, 2015 9:39 am
Re: The "How do I..." Thread
What are you trying to do, in the first place? Shoot 8 bullets with increasing spread?
Also, does that freeze/crash happen if you do it via a state loop rather than anonymous function?
Also, does that freeze/crash happen if you do it via a state loop rather than anonymous function?
Re: The "How do I..." Thread
No, I'm just simplifying my manual circular pattern code, replacing it by the use of sin/cos expressions along with FBF_EXPLICITANGLE flag.
Well, the state loop you suggested crashed as well, but I found the cause; for some reason the user variable wasn't incrementing properly (or maybe there's some sort of upper limit I've forgotten), so it never reached the end condition. This, coupled with zero-tic duration of the looped action produced the freeze, of course.
So I switched to args, and it worked like a charm right off the bat:
Well, the state loop you suggested crashed as well, but I found the cause; for some reason the user variable wasn't incrementing properly (or maybe there's some sort of upper limit I've forgotten), so it never reached the end condition. This, coupled with zero-tic duration of the looped action produced the freeze, of course.
So I switched to args, and it worked like a charm right off the bat:
Code: Select all
for (A_SetArg(4, 0); args[4] < 360; A_SetArg(4, args[4] + 45))
-
- Posts: 5046
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
The issue you're having is this: http://forum.zdoom.org/viewtopic.php?f=7&t=53361
- adamaH_oriH
- Posts: 327
- Joined: Thu Jul 23, 2015 8:10 am
- Location: Mars Base
Re: The "How do I..." Thread
Hey, I have two customdeaths for the player using 2 'NewDoomPlayer's
whenever Hiro get's killed by an imp,
this happens:
KEYCONF:
DECORATE:
and when Hiro get's killed by Vader's lightsaber...
KEYCONDEF:
DECORATE:
NOW... Here's the problem...
when I inserted Vadder death code, the dalek death code would not work.
I figured it had to do with the KEYCONF, so I tried two things:
1. Put
and
in the same KEYCONF Text File.
AND
2.
put
AND
in Two different KEYCONF text files.
Neither gave any Avail, mostly, the 'NewDoomplayer1' Dalek Death would not be in the game, but the Vader one would. What's Happening?
whenever Hiro get's killed by an imp,
this happens:
KEYCONF:
Code: Select all
clearplayerclasses
addplayerclass NewDoomPlayer1
Code: Select all
ACTOR NewDoomPlayer1 : DoomPlayer replaces DoomPlayer
{
+NOSKIN
States
{
Death.DalekBall:
LASD A 3 bright
PLAY G 2 A_PlayerScream
LASD A 3 bright
PLAY G 2
LASD A 3 bright
PLAY G 2
LASD A 3 bright
PLAY G 2
PLAY H 10
PLAY I 10
PLAY J 10 A_NoBlocking
PLAY KLM 10
PLAY N -1
Stop
}
}
KEYCONDEF:
Code: Select all
clearplayerclasses
addplayerclass NewDoomPlayer2
Code: Select all
ACTOR NewDoomPlayer2 : DoomPlayer replaces DoomPlayer
{
+NOSKIN
States
{
Death.VaderMelee:
PLVD A 2 A_PlaySound ("player/vaderkillmelee")
PLVD B 0 A_SpawnItemEx("HiroHead", 0, 0, 40, random(2,4), random(2,4), random(2,4), random(0,360), 161)
PLVD B 14 bright
PLVD C 8
PLVD D 8
PLVD E 8
PLVD F 8 A_NoBlocking
PLVD GG 8
PLVD G -1
Stop
}
}
Actor HiroHead
{
Radius 11
Height 11
Speed 0
Damage 0
Projectile
BounceType "Doom"
-NOGRAVITY
+DOOMBOUNCE
+BOUNCEONACTORS
States
{
Spawn:
HHHD ABCDEFGH 4
loop
Death:
HHHD I -1
stop
}
}
when I inserted Vadder death code, the dalek death code would not work.
I figured it had to do with the KEYCONF, so I tried two things:
1. Put
Code: Select all
clearplayerclasses
addplayerclass NewDoomPlayer1
Code: Select all
clearplayerclasses
addplayerclass NewDoomPlayer2
AND
2.
put
Code: Select all
clearplayerclasses
addplayerclass NewDoomPlayer1
Code: Select all
clearplayerclasses
addplayerclass NewDoomPlayer2
Neither gave any Avail, mostly, the 'NewDoomplayer1' Dalek Death would not be in the game, but the Vader one would. What's Happening?
- wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
- Contact:
Re: The "How do I..." Thread
Please upload a WAD file for us to look at. Your instructions are not enough to reproduce the problem.
- adamaH_oriH
- Posts: 327
- Joined: Thu Jul 23, 2015 8:10 am
- Location: Mars Base
Re: The "How do I..." Thread
I'm only going to give you the main problem part, the main wad file is, well... let's just say...wildweasel wrote:Please upload a WAD file for us to look at. Your instructions are not enough to reproduce the problem.
HUGE...
First off, how do I send a file through Dropbox?
second, when you get the wad file, the two KEYCONFs are in the same text file.
try that, make sure you will not get a 'select class' menu
if that happens, try splitting the KEYCONFs of NewDoomPlayer1 and NewDoomPlayer2 into two different KEYCONF text files.
Re: The "How do I..." Thread
I'd avoid using KEYCONF to add your player classes. Mapinfo is the way to go. As for your extra death states, why not place them in the same actor?
Re: The "How do I..." Thread
Would the problem be that you're putting each new death animation in its own player class? The player can only be one player class at a time. Try putting both death states in the same player class.
- adamaH_oriH
- Posts: 327
- Joined: Thu Jul 23, 2015 8:10 am
- Location: Mars Base
Re: The "How do I..." Thread
How do I use it in MAPINFO? Put them in the same Actor?jpalomo wrote:I'd avoid using KEYCONF to add your player classes. Mapinfo is the way to go. As for your extra death states, why not place them in the same actor?
that's what I'm trying to do, put both death states in the same player, whenever Hiro gets killed by a certian attack, it has it's own death animation (Like BD has different death states.) Also, what do you mean by putting it in it's own player class?Arookas wrote:Would the problem be that you're putting each new death animation in its own player class? The player can only be one player class at a time. Try putting both death states in the same player class.
I would lend you the WAD that has the problem, but It's a bit big. (two monsters, 1 player)