Jump to content

DoomTools A_SpidRefire (Solved)


Recommended Posts

Seems, A_SpidRefire dont work properly

 

I want the rocket to constantly fire after the death of a monster, but I have no idea how to do this because the function does not work. I have to take goto missile2 loop, but it returns to the loop see but not to death. Any idea?

 

Spoiler

auto thing Phantom "Phantom"
{
    //$Category Monsters/Strong
    //$EditorSprite SP07A1
	EdNum 1010
        
        Health 1500
        Speed 8
        Radius 24
        Height 56
        Damage 0
        ReactionTime 8
        PainChance 50
        Mass 1000
    
        clear flags
        +SOLID
        +SHOOTABLE
		+COUNTKILL
		+NOGRAVITY
		+FLOAT
    
        SeeSound "brssit"
        AttackSound ""
        PainSound "dmpain"
        DeathSound "brsdth"
        ActiveSound "dmact"
        
        states
        {
			  Spawn:
				SP07 AB 10 A_Look
				Loop
			  See:
				SP07 AABBCCDD 3 A_Chase
				Loop
			  Missile:
				SP07 EF 8 A_FaceTarget
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 0, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 5, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, -5, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 10, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, -10, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 15, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, -15, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 20, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, -20, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 25, 0, 0, 0)
				SP07 G 6 A_MonsterProjectile(PhantomFireball, -25, 0, 0, 0)
				Goto See
			  Pain:
				SP07 H 2
				SP07 H 2 A_Pain
				Goto See
			  Death:
				SP07 I 8
				SP07 J 8 A_Scream
				SP07 K 8
				SP07 L 1 A_CyberAttack
			    SP07 L 1 A_SpidRefire
				SP07 L 8 A_Fall
				SP07 MN 8 
				SP07 O -1 
				Stop
			  Raise:
				SP07 O 8
				SP07 NMLKJI 8
				Goto See
        }
}

 

 

Edited by CrazyDoomguy
Solved

Share this post


Link to post

that's how A_SpidRefire works - it returns to see after completion. [edit: just realized A_RefireTo was player-only and not for monsters lol, nvm]

Edited by msx2plus

Share this post


Link to post
1 minute ago, msx2plus said:

that's how A_SpidRefire works - it returns to see after completion. [edit: just realized A_RefireTo was player-only and not for monsters lol, nvm]

If you play complevel 9, A_SpidRefire works well and does what I wanted. this stop until he dont see you

 

Share this post


Link to post

Nice idea but there no A_JumpIfTargetNotSight...

			Missile2:
				SP07 L 1 A_CyberAttack
				SP07 L 0 A_JumpIfTargetNotSight(Death2)
			   Goto Missile2
			Pain:
				SP07 H 2
				SP07 H 2 A_Pain
				Goto See
			Death:
				SP07 I 8
				SP07 J 8 A_Scream
				SP07 K 8
				SP07 L 1 A_JumpIfTargetInSight(Missile2)
				SP07 L 8 A_Fall
				SP07 MN 8 
			Death2:
				SP07 O -1 
				Stop
			Raise:
				SP07 O 8
				SP07 NMLKJI 8
				Goto See

 

Share this post


Link to post

solved. I genius! :)

 

			Missile2:
				SP07 L 1 A_CyberAttack
				SP07 L 0 A_JumpIfTargetInSight(Missile2)
			   Goto Death2
			Pain:
				SP07 H 2
				SP07 H 2 A_Pain
				Goto See
			Death:
				SP07 I 8
				SP07 J 8 A_Scream
				SP07 K 8
				SP07 L 1 A_JumpIfTargetInSight(Missile2)
				SP07 L 8 A_Fall
				SP07 MN 8 
			Death2:
				SP07 O -1 
				Stop
			Raise:
				SP07 O 8
				SP07 NMLKJI 8
				Goto See
        }
}

 

Share this post


Link to post
7 hours ago, Red Recluse said:

This spide works under complevel 9 or 21

Yes, both works, but there small difference.

 

I found better code because the missile shoots at the enemy forever, which is not my desire.

 

Spoiler

 states
        {
			Spawn:
				SP07 AB 10 A_Look
				Loop
			See:
				SP07 AABBCCDD 0 A_JumpIfHealthBelow(death2, 0)
				SP07 AABBCCDD 3 A_Chase
				Loop
			Missile:
				SP07 EF 8 A_FaceTarget
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 0, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 5, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, -5, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 10, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, -10, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 15, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, -15, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 20, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, -20, 0, 0, 0)
				SP07 G 0 A_MonsterProjectile(PhantomFireball, 25, 0, 0, 0)
				SP07 G 6 A_MonsterProjectile(PhantomFireball, -25, 0, 0, 0)
				Goto See
			Missile2:
				SP07 L 1 A_CyberAttack
				SP07 L 1 A_SpidRefire 
			   Goto Missile2
			Pain:
				SP07 H 2
				SP07 H 2 A_Pain
				Goto See
			Death:
				SP07 I 8
				SP07 J 8 A_Scream
				SP07 K 8
				SP07 L 8 A_Fall
				SP07 L 1 A_JumpIfTargetInSight(Missile2)
			Death2:
				SP07 MN 4 
				SP07 O -1 
				Stop
			Raise:
				SP07 O 8
				SP07 NMLKJI 8
				Goto See
        }
}

 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...