The "How do I..." Thread

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
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: The "How do I..." Thread

Post by NeuralStunner »

D2JK wrote:Try A_Recoil, the angle shouldn't matter. Combine with ThrustThingZ, if you need a tad of vertical thrust as well.
Why are people still using, reusing, and suggesting those terrible old functions?! [wiki=A_ChangeVelocity]Why not let bad habits die.[/wiki]
User avatar
Carbine Dioxide
Posts: 1936
Joined: Thu Jun 12, 2014 3:16 pm
Location: Anywhere.

Re: The "How do I..." Thread

Post by Carbine Dioxide »

That's a little better. While I am here, is there an action that jumps to a state based on how much damage the actor is taking? Maybe a action that jumps to a state based on what the damage type is? Like a JumpIf or something?
User avatar
BigProjectAlone
Posts: 780
Joined: Wed Mar 21, 2012 5:38 am
Location: canada

Re: The "How do I..." Thread

Post by BigProjectAlone »

hello! i need help because i can't figure this out at all..

i've managed to do my character that walk and you can press the use key on it to talk with her.
all works fine, the only problem is the Hudmessage that doesn't want to appear in the screen.
if i use the PUKE ** cheat it works well.. but if i do press use key on the character it doesn't show up?

here is my character decorate:

Code: Select all

ACTOR Alyza : switchingdecoration replaces Alyza2 7080
{
//$Category Characters
  xscale 0.43
  yscale 0.53
  Health 5000
  Radius 20
  Height 68
  Mass 175
  Speed 5
  +FLOORCLIP
  +solid
  Activation THINGSPEC_Activate
  +USESPECIAL  
  States
  {
  Spawn:
    KUJO AABBCCDD 5 A_Wander
    Loop
	Active:
	KUJO A 1 A_facetarget 
	KUJO A 200 Acs_execute(55,0)
    Goto Spawn
  }
}

ACTOR Alyza2 7301
{
//$Category Characters
  xscale 0.43
  yscale 0.53
  Health 5000
  Radius 20
  Height 68
  Mass 175
  Speed 5
  Damage 6
  Painchance 60
  Monster
  +FLOORCLIP
  +TELESTOMP
  +invulnerable
  SeeSound "SHESIT"
  PainSound "SHEPAIN"
  DeathSound "SHEPAIN"
  ActiveSound "SHEACT"
  HowlSound "SHEPAIN"
  Obituary "%o as been purified by Alyza..."
  States
  {
  Spawn:
    KUJO AABBCCDD 5 A_Wander
	KUJO A 1 A_JumpIfcloser(32,2)
    Loop
  Pain:
    KUJO L 7 A_Pain
    Goto See
  Death:
   TNT1 A 1 A_SPawnitem("MySpawnermoyen")
    KUJO L 8
    KUJO N 1
    KUJO N 5 A_Scream
    KUJO N 1 A_NoBlocking
    KUJO O 30000
    KUJO O 1 A_Respawn
    Stop
    Burn:
	TNT1 A 1 A_SPawnitem("MySpawnermoyen")
    KUJO L 1 A_Spawndebris("FEMMEBURN")
    SUCO Z 25000
    SUCO Z 1 A_Respawn
    stop
  }
}
and here is the script in map:

Code: Select all

script 55 (void)
{
delay(21);
HudMessage(s:"You: Alyza your father want you to come home.";
HUDMSG_PLAIN, 0, CR_gold, 0.5, 0.8, 5.0);
delay(10*17);
ActivatorSound("AL1",255);
hudmessage(s:"Alyza: who are you?, anyway.. thank you. i'll be there soon.";
HUDMSG_PLAIN, 0, CR_red, 0.5, 0.8, 5.0);
thing_remove(143);
acs_execute(3,10,0,0,0);
}
can you help me please?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: The "How do I..." Thread

Post by Gez »

You need to use THINGSPEC_Activate|THINGSPEC_ThingTargets as the activation value, and in your script you need to call [wiki]SetActivatorToTarget[/wiki] before the HUDMessage functions.

The script is run from the actor's state, so its activator is always the switchingdecoration.


Alternatively, instead of running script 55 from the state, give the Alyza decoration the 80:[wiki]ACS_Execute[/wiki](55) special. Then activating it will run the script using the trigger as the activator.
User avatar
BigProjectAlone
Posts: 780
Joined: Wed Mar 21, 2012 5:38 am
Location: canada

Re: The "How do I..." Thread

Post by BigProjectAlone »

Gez wrote:You need to use THINGSPEC_Activate|THINGSPEC_ThingTargets as the activation value, and in your script you need to call [wiki]SetActivatorToTarget[/wiki] before the HUDMessage functions.

The script is run from the actor's state, so its activator is always the switchingdecoration.


Alternatively, instead of running script 55 from the state, give the Alyza decoration the 80:[wiki]ACS_Execute[/wiki](55) special. Then activating it will run the script using the trigger as the activator.

thank you very very much!
User avatar
xenoxols
Posts: 2133
Joined: Mon Mar 18, 2013 6:08 pm
Preferred Pronouns: She/Her
Location: Behind you

Re: The "How do I..." Thread

Post by xenoxols »

How do you make the screen not flash red when you take a lot of damage?
User avatar
WARCHILD_89
Posts: 452
Joined: Sun Nov 17, 2013 12:27 pm
Graphics Processor: nVidia with Vulkan support
Location: MIA between doomed dimensions

Re: The "How do I..." Thread

Post by WARCHILD_89 »

I have a problem:

The wiki says that a projectile can enter different death states depending on what it hits:

Death state: When hitting a wall (decals and effects work fine)

XDeath State: When hitting a bleeding actor (spawning brutal doom blood, works fine, too)

Crush: When hitting a non-bleeding actor (for example the enemy is a vechicle, it spawns metal junk but that does not work.... :?: )


So When an actor has the +NOBLOOD flag set, my projectile should enter its crush state and spawn metal chunks but for some reason it doesn´t....... > :(
Monsters with the the +NOBLOOD flag set still bleed.....

With other words, my projectile never enters its crush state, no matter if +NOBLOOD is set or not

This is the projectile code

Actor Nemesis_Bullet : FastProjectile //Not doing damage at all, but managing its death states
{
RenderStyle Add
Alpha 0.8
YScale 0.12
XScale 0.3
Speed 100
radius 10
height 8
damage 0
Decal "BulletChip"
SeeSound "Whizby"
States
{
Spawn:
TRAC A 1 bright
loop
Death:
TRAC A 1 A_SpawnItem("NewBulletpuff") // When hitting a wall
stop
XDeath:
NULL A 1 A_CustomMissile ("Brutal_Blood", 8, 0, random (0, 360), 2, random (0, 160)) //When hitting a monster
Stop
crush:
NULL A 1 A_CustomMissile ("Junky", 8, 0, random (0, 360), 2, random (0, 160)) //DOES NOT WORK
Stop

}
}

Actor Nemesis_SHT_Bullet : Nemesis_Bullet //This is what does the damage to mosters, but this works fine
{
Damage 3
}
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: The "How do I..." Thread

Post by Blue Shadow »

xenoxols wrote:How do you make the screen not flash red when you take a lot of damage?
[wiki=Player_properties#Player.DamageScreenColor]Player.DamageScreenColor[/wiki] has an intensity parameter. Try that.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: The "How do I..." Thread

Post by Gez »

I don't know why it doesn't work, but please, do not use NULL A as a state; use TNT1 A, thanks.
User avatar
TheBadHustlex
Posts: 1914
Joined: Thu Oct 03, 2013 12:50 am
Location: 'stria

Re: The "How do I..." Thread

Post by TheBadHustlex »

Help please.

I manually deleted two textures (including their patches) from my texture-directories. Now, when I try to start the game, it says "Bad Texture-Directory". What can I do to fix that?

This is as far as the execution goes:
Spoiler:
User avatar
Vincent(PDP)
Posts: 60
Joined: Fri May 16, 2014 3:49 pm
Location: Sweden
Contact:

Re: The "How do I..." Thread

Post by Vincent(PDP) »

TheBadHustlex wrote:Help please.

I manually deleted two textures (including their patches) from my texture-directories. Now, when I try to start the game, it says "Bad Texture-Directory". What can I do to fix that?

This is as far as the execution goes:
Spoiler:
If this is a wad/pk3:
Edit the texture file and the Patch Names file and remove your texture from there too.
User avatar
WARCHILD_89
Posts: 452
Joined: Sun Nov 17, 2013 12:27 pm
Graphics Processor: nVidia with Vulkan support
Location: MIA between doomed dimensions

Re: The "How do I..." Thread

Post by WARCHILD_89 »

Gez wrote:I don't know why it doesn't work, but please, do not use NULL A as a state; use TNT1 A, thanks.

Change Frame names. TNT1 A looks better to me, too.

I still don´t understand why Death and Xdeath are working but the CRUSH state does not but I think "CheckIfInTargetInventory("nonbleeding",1,"crush")" should solve this...not the best way.... :?
User avatar
TheBadHustlex
Posts: 1914
Joined: Thu Oct 03, 2013 12:50 am
Location: 'stria

Re: The "How do I..." Thread

Post by TheBadHustlex »

Vincent(PDP) wrote: If this is a wad/pk3:
Edit the texture file and the Patch Names file and remove your texture from there too.
Well, that's where I deleted them from. They are not there, but the game won't run...
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

Re: The "How do I..." Thread

Post by D2JK »

I still don´t understand why Death and Xdeath are working but the CRUSH state does not
It's not "crush", but "crash". :wink:

Actor states , Projectile (maybe you knew these two already).
User avatar
Carbine Dioxide
Posts: 1936
Joined: Thu Jun 12, 2014 3:16 pm
Location: Anywhere.

Re: The "How do I..." Thread

Post by Carbine Dioxide »

This isn't really a "How Do I" question, but can anyone one tell me if the blood on pain.head is coming out of the zombie man's head? I looked at it in game, and it's so fast, I can't tell.

Code: Select all

Pain.Head:
POSS G 3
TNT1 A 0 A_SpawnDebris("NashgoreFlyingBlood", 1, 0, 2)
POSS G 3 A_Pain
Goto See
Locked

Return to “Editing (Archive)”