Not Spawning =/

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.
Locked
User avatar
Maelstrom
Posts: 231
Joined: Mon Feb 25, 2008 4:15 am
Location: Australia, Canberra

Not Spawning =/

Post by Maelstrom »

I've made a customized version of the Heretic Imp, because of a custom weapon mod that I'm making. The customized Imp if taken damage from a certain method, will transform into a creature helping you. However it takes the special damage type and goes to the custom pain state, because it dies straight after that customized state. However it isn't spawning the monster I want it to during the pain state. If anyone could tell me what I'm doing wrong I would greatly appreciate it =) Code is below. If you need any more info like the monster it spawns or the projectile that transforms it just ask.

Code: Select all

actor NewHereticImp : HereticImp
{
+NOTARGET
+AMBUSH
PainChance "Ice2", 255
PainChance "GlassMorph", 255
Damagefactor "Immune", 0
  states
  {
  Pain.Ice2:
    IMPX G 200
	goto see
  Pain.GlassMorph:
	TNT1 G 1 A_NoBlocking
	TNT1 G 1 A_SpawnItem("GlassImp",0,0,0)
	TNT1 G 1 A_Die
	stop
  }
}
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: Not Spawning =/

Post by NeuralStunner »

I would think that A_NoBlocking would leave room for the spawned monster... :?

Try [wiki=A_SpawnItemEx]A_SpawnItemEx[/wiki]?
User avatar
Maelstrom
Posts: 231
Joined: Mon Feb 25, 2008 4:15 am
Location: Australia, Canberra

Re: Not Spawning =/

Post by Maelstrom »

I will but wont that affect online play, oh no that's only if you put the 128 flag in, nevermind. I'll try that and get back to you.
User avatar
Maelstrom
Posts: 231
Joined: Mon Feb 25, 2008 4:15 am
Location: Australia, Canberra

Re: Not Spawning =/

Post by Maelstrom »

No difference, monster still dies nothing spawns =/

I'll put up the rest of the code below for the projectile and the monster it spawns.

Code: Select all

actor GlassMorph
{
  Radius 6
  Height 8
  Speed 30
  FastSpeed 60
  Scale 0.8
  Damage 1
  DamageType GlassMorph
  Projectile
  +RANDOMIZE
  +REFLECTIVE
  RenderStyle Add
  Alpha 0.5
  seesound "monster/tenatk"
  deathsound "weapons/plasmax"
  States
  {
  Spawn:
    POLP A 0 Bright A_SpawnItemEx("GlassParticleFloat", Random(-5,5), Random(-5,5), Random(-5,5), Random(-1, 1), Random(-1, 1), Random(2, 4), 0, 128, 0)
    POLP AB 2 bright A_SpawnItemEx("GlassShotT",0,0,0,0,0,0,0,128)
	POLP A 0 Bright A_SpawnItemEx("GlassParticleFloat", Random(-5,5), Random(-5,5), Random(-5,5), Random(-1, 1), Random(-1, 1), Random(2, 4), 0, 128, 0)
	POLP CD 2 bright A_SpawnItemEx("GlassShotT",0,0,0,0,0,0,0,128)
	POLP A 0 Bright A_SpawnItemEx("GlassParticleFloat", Random(-5,5), Random(-5,5), Random(-5,5), Random(-1, 1), Random(-1, 1), Random(2, 4), 0, 128, 0)
    loop
  Death:
	POLD ABCD 4 bright
    stop
  }
}

ACTOR GlassImp
{
  Health 80
  Radius 16
  Height 36
  Mass 50
  Speed 10
  Painchance 200
  RenderStyle Translucent
  Alpha 0.5
  Monster
  +FLOAT
  +NOGRAVITY
  +SPAWNFLOAT
  +DONTOVERLAP
  +MISSILEMORE
  +FRIENDLY
  SeeSound "himp/sight"
  AttackSound "himp/attack"
  PainSound "himp/pain"
  DeathSound "himp/death"
  ActiveSound "himp/active"
  Translation "115:127=23:35"
  States
  {
  Spawn:
    AMPX ABCB 10 A_Look
    Loop
  See:
    AMPX AABBCCBB 3 A_Chase
    Loop
  Melee:
    AMPX DE 6 A_FaceTarget
    AMPX F 6 A_CustomMeleeAttack(random[ImpMeAttack](10,24), "himp/attack", "himp/attack")
    Goto See
  Missile:
    AMPX A 10 A_FaceTarget
    AMPX B 6 A_SkullAttack
    AMPX CBAB 6
    Goto Missile+2
  Pain:
    AMPX G 3
    AMPX G 3 A_Pain
    Goto See
  Death:
    AMPX G 4 A_Scream
    AMPX H 5 A_NoBlocking
    Wait
  XDeath:
    AMPX S 5 A_XScream
    AMPX TU 5 A_NoBlocking
    AMPX V 5 A_Gravity
    AMPX W 5 
    Wait
  Crash:
    AMPX I 7 A_NoBlocking
    AMPX J 7 A_Scream
    AMPX K 7
    AMPX L -1
    Stop
  XCrash:
    AMPX X 7 A_NoBlocking
    AMPX Y 7
    AMPX Z -1
    Stop
  }
}
User avatar
ZDG
Posts: 918
Joined: Sat Jan 02, 2010 12:01 pm
Location: in SlumpEd

Re: Not Spawning =/

Post by ZDG »

Are you sure that the Attack doesn't do too much damage?
User avatar
Maelstrom
Posts: 231
Joined: Mon Feb 25, 2008 4:15 am
Location: Australia, Canberra

Re: Not Spawning =/

Post by Maelstrom »

Projectile does 1 damage =P. I posted up the code for the projectile. It's just after that pain state cause I want the monster to die anyway, so it goes to A_Die but the projectile still does low damage so it can only kill certain types of monsters. I could just make all the custom monsters in this immune to said damage type but that will take a considerable amount of time as there is quite alot of custom enemies in this mod.
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: Not Spawning =/

Post by NeuralStunner »

Maelstrom wrote:Projectile does 1 damage =P.
1 to 8, to be precise. You can use the following:

Code: Select all

Damage (1)
... to specify 1 damage always.

Alternatively:

Code: Select all

Damage 0
+FORCEPAIN
... to do no damage at all, however other enemies will still react to pain every time.
User avatar
Maelstrom
Posts: 231
Joined: Mon Feb 25, 2008 4:15 am
Location: Australia, Canberra

Re: Not Spawning =/

Post by Maelstrom »

That's not the problem however, the problem is that it's not spawning the monster, from the monster taking pain from the certain damage type.
Locked

Return to “Editing (Archive)”