Jump to content
  • 0

Random spread with A_MonsterProjectile


_@/

Question

How would you get a monster's projectiles to have random spread in deco hack? I can think of a very hacky solution using random jumps and pre-determined angles, but if there's a more elegant way of doing this I'd love to know.

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 0

Heres how I did it on my SSG for my Code Zleek Doom Zandronum mod for a bullet tracer. I'm not sure about Deco Hack because I dont write for MBF21, but the technique is probably similar.

 

TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_FIRECUSTOMMISSILE("Tracer", random(11,-11),0,0,0,0,random(7,-7))

Heres How I did it in the same mod for a Shotgunner.

 

	TNT1 A 0 A_SPOSATTACKUSEATKSOUND	
	TNT1 AAA 0  A_CUSTOMMISSILE("Tracer",28,0,random(22,-22))

 

And here is the TRACER actor

 

Actor Tracer: Doomimpball
{ 
   Height 1 
   Radius 1  
  Damage  0
   Scale 0.25 
   //+ROCKETTRAIL
   Deathsound "NONE"
   Attacksound "NONE"
   SeeSound "none"
   Projectile
   Speed 65
    States
	 {
	   Spawn:
	    BAL1 A 5 BRIGHT A_SPAWNITEM("TRACER2")
		//BAL1 A 1 BRIGHT A_SPAWNITEM("TRACER2")
		 Loop
		 Death:	
		   ///TNT1 A 0 A_EXPLODE(0,0,0,0,0,0,0,"BulletPuff")
		   TNT1 A 0
		  
		  Stop
}}	

Actor Tracer2 :BUlletpuff{}

 

Edited by kalensar

Share this post


Link to post
  • 0

DecoHack is just a tool, not a modding standard. I assume you meant MBF21 or DSDHacked?

 

From my brief research it doesn't look like you can randomize parameters like you can in DECORATE/Zscript. 

Edited by magicsofa

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
Answer this question...

×   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...