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.
- SoundOfDarkness
- Posts: 114
- Joined: Tue Feb 28, 2017 5:53 pm
- Location: at home
Re: The "How do I..." Thread
I have 2 questions.
1. How to make it that a point blank kill with the super shotgun always gibs the enemy?
2. More or less the same for quad damage. I want enemies to gib when killed while quad damage is active. I already realized that adding +EXTREMEDEATH to the powerup doesn't work.
1. How to make it that a point blank kill with the super shotgun always gibs the enemy?
2. More or less the same for quad damage. I want enemies to gib when killed while quad damage is active. I already realized that adding +EXTREMEDEATH to the powerup doesn't work.
Re: The "How do I..." Thread
I'm trying to make a PSX style intermission message screen like on the TC. The trouble I'm having is that there appears to be a limit to how many words can go in the sentence with HUDMESSAGE being the thing that actually list the messages. This will result in the words overlapping on the message screen using the HUDMESSAGE.
So my question is. Can I increase the HUDMESSAGE limit?
So my question is. Can I increase the HUDMESSAGE limit?
- MetallicaSepultura
- Posts: 178
- Joined: Sun May 15, 2016 3:49 am
- Location: Futura City, currently slaughtering Rahzs
Re: The "How do I..." Thread
how can i manage to make an enemy move towards a certain distance, and then after reaching it he starts shooting?
Code: Select all
//this is the enemy decorate
actor Mitragliere 15003{
radius 20
Monster
height 56
health 1
scale 2
+FLOORCLIP
States{
Spawn:
SEPM A 0
SEPM A 0 acs_executealways(5,0)
Goto See
See:
SEPM AB 4
Loop
Missile:
SEPM AB 1
Goto Spawn
Melee:
SEPM AB 1 BRIGHT
Goto Missile
Death:
SEPM C 20
stop
}
}
//and this is the momement script he uses
script 5 (void)
{
do
{
setactorposition(0,getactorx(0),getactory(0)-4.0,0.0,0);
delay(1);
}
while (getactory(0)>getactorY(16));
}
Re: The "How do I..." Thread
https://zdoom.org/wiki/A_SpawnProjectile
with
CMF_AIMDIRECTION - The missile is not aimed at a target. Instead, it is shot in the specified direction with the specified pitch.
or
CMF_ABSOLUTEPITCH - Use the pitch parameter as an absolute value, ignoring the calculated aim pitch. Implied CMF_AIMDIRECTION. The main difference here is that a target is required, where CMF_AIMDIRECTION does not require a target.
because i dont get, you need just shoot somewhere or shoot into player.
with
CMF_AIMDIRECTION - The missile is not aimed at a target. Instead, it is shot in the specified direction with the specified pitch.
or
CMF_ABSOLUTEPITCH - Use the pitch parameter as an absolute value, ignoring the calculated aim pitch. Implied CMF_AIMDIRECTION. The main difference here is that a target is required, where CMF_AIMDIRECTION does not require a target.
because i dont get, you need just shoot somewhere or shoot into player.
- MetallicaSepultura
- Posts: 178
- Joined: Sun May 15, 2016 3:49 am
- Location: Futura City, currently slaughtering Rahzs
Re: The "How do I..." Thread
i've probably found a solution for the enemies moving and after a certain distance shooting.
https://zdoom.org/wiki/User_variable#Conditions
i've used variables in DECORATE, so that when the enemy reaches a certain distance (a counter), he starts shooting
the problem is that when i start the game it always says "the frame must be 4 characters", and i don't know where is the problem in the code.
https://zdoom.org/wiki/User_variable#Conditions
i've used variables in DECORATE, so that when the enemy reaches a certain distance (a counter), he starts shooting
the problem is that when i start the game it always says "the frame must be 4 characters", and i don't know where is the problem in the code.
Code: Select all
actor Mitragliere 15003{
radius 20
var int user_distance;
Monster
height 56
health 1
scale 2
+FLOORCLIP
States{
Spawn:
SEPM A 0
{
user_distance = 56;
}
SEPM A 0 acs_executealways(5,0)
Goto See
See:
SEPM AB 4
{
if (user_distance<=0){
Goto Melee
}
else{
user_distance--;
}
}
Loop
Missile:
SEPM AB 1
Goto Spawn
Melee:
SEPM AB 1 BRIGHT a_custommissile("ProiettileAntiRivolta",24,0,0,cmf_aimdirection,0)
Goto Missile
Death:
TNT1 A 0 a_spawnitem("AntiBarricataMorto",0,24)
stop
}
}
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
You cannot use Goto inside [wiki=Actor_states#Anonymous_functions]anonymous functions[/wiki].
- MetallicaSepultura
- Posts: 178
- Joined: Sun May 15, 2016 3:49 am
- Location: Futura City, currently slaughtering Rahzs
Re: The "How do I..." Thread
tried to change the code without using Goto inside function, still doesn't work.Blue Shadow wrote:You cannot use Goto inside [wiki=Actor_states#Anonymous_functions]anonymous functions[/wiki].
Code: Select all
States{
Spawn:
SEPM A 0
{
user_distance = 56;
}
SEPM A 0 acs_executealways(5,0)
Goto See
See:
SEPM AB 4
{
if (user_distance<=0){
a_custommissile("ProiettileAntiRivolta",24,0,0,cmf_aimdirection,0);
}
else{
user_distance--;
}
}
Loop
Missile:
SEPM AB 1
Goto Spawn
Melee:
Goto Missile
Death:
TNT1 A 0 a_spawnitem("AntiBarricataMorto",0,24)
stop
}
}
Re: The "How do I..." Thread
May I ask one simple question?
I dunno if the anonymous functions are needed to fix this, but...
How do I set an actor Angle and Pitch to match sloped floor surface normals?
(an actor Z axis have to face the normal(the floor) whenever its sloped or not)
It's not very easy to me as I'm just a beginner in ZScripts,
but I'm sure this has been fixed before under different tags.
Setting an actor's Up to sector surface normal.
I dunno if the anonymous functions are needed to fix this, but...
How do I set an actor Angle and Pitch to match sloped floor surface normals?
(an actor Z axis have to face the normal(the floor) whenever its sloped or not)
It's not very easy to me as I'm just a beginner in ZScripts,
but I'm sure this has been fixed before under different tags.
Setting an actor's Up to sector surface normal.
Re: The "How do I..." Thread
How make a_wander function more offen change direction of wandering?
I try angle actor with a_setangle, but that only make monster sprite spin "like record baby, round round, round round..." and dont change direction of wandering.
I try angle actor with a_setangle, but that only make monster sprite spin "like record baby, round round, round round..." and dont change direction of wandering.
Re: The "How do I..." Thread
There are somewhereChickenlegz wrote:May I ask one simple question?
I dunno if the anonymous functions are needed to fix this, but...
How do I set an actor Angle and Pitch to match sloped floor surface normals?
(an actor Z axis have to face the normal(the floor) whenever its sloped or not)
It's not very easy to me as I'm just a beginner in ZScripts,
but I'm sure this has been fixed before under different tags.
Setting an actor's Up to sector surface normal.
viewtopic.php?p=973384#p973384
Or just ask cooke, if it has not yet arrived at hawaii.
Re: The "How do I..." Thread
Nice, there've got itApeirogon wrote:
There are somewhere
viewtopic.php?p=973384#p973384
Or just ask cooke, if it has not yet arrived at hawaii.
Rachael's alg may work, otherwise I'll ask cooke.
Thanx for link Apeirogon
Re: The "How do I..." Thread
btw, haven't tested this, but A_SetAngle prior A_Wander with CHF_NODIRECTIONTURN as combi, perhaps it helps.Apeirogon wrote:How make a_wander function more offen change direction of wandering?
I try angle actor with a_setangle, but that only make monster sprite spin "like record baby, round round, round round..." and dont change direction of wandering.
Code: Select all
Wander:
NAME A 0 A_SetAngle(angle)
NAME A 4 A_Wander(CHF_NODIRECTIONTURN)
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
The error is probably coming from somewhere else not related to that actor, since I didn't get it when testing. Although just to be sure, what version of GZDoom are you using?MetallicaSepultura wrote:tried to change the code without using Goto inside function, still doesn't work.
- MetallicaSepultura
- Posts: 178
- Joined: Sun May 15, 2016 3:49 am
- Location: Futura City, currently slaughtering Rahzs
Re: The "How do I..." Thread
mhhh, strange.Blue Shadow wrote:The error is probably coming from somewhere else not related to that actor, since I didn't get it when testing. Although just to be sure, what version of GZDoom are you using?MetallicaSepultura wrote:tried to change the code without using Goto inside function, still doesn't work.
aniway, i changed the code now with this one:
Code: Select all
See:
SEPM A 4
SEPM A 0 A_SetUserVar("user_distance",user_distance+1)
SEPM A 0 A_JumpIf(user_distance==4,"Missile")
SEPM B 4
Loop
Missile:
SEPM A 1 a_custommissile("ProiettileAntiRivolta",24,0,Random(-7,7),cmf_aimdirection)
SEPM B 1
SEPM A 0 A_PlaySound("MGun/Fire")
SEPM A 4
SEPM A 0 A_SetUserVar("user_distance",0)
Goto See
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: The "How do I..." Thread
I think you're using an old version of GZDoom which doesn't support anonymous functions, because I just tried the same code with GZDoom 2.1.1, and it gave me that error.