It is Shrinker possible to made in GZDoom?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Ahpiox
Posts: 98
Joined: Fri Dec 22, 2017 1:52 am

It is Shrinker possible to made in GZDoom?

Post by Ahpiox »

Im working on Duke3D mod for Doom (as u can see).
And i want to port Shrinker, because it will be fun to smash this little bastards with your Mighty Foot.

I tried to do this through CustomInventory item, which was supposed to change enemies scale. But it's dont want to do anything.
Help please

Code: Select all

ACTOR Nuking_Shrink
{
  Radius 7
  Height 10
  Speed 31
  Damage 1
  Scale 1
  Decal "Scorch"
  SeeSound ""
  States
  {
  Spawn:
	0011 A 1
	Loop
  Death:
    TNT1 A 1 A_RadiusGive("Nuking_ShrinkingShit",12,RGF_NOTARGET|RGF_MONSTERS|RGF_CUBE|RGF_NOSIGHT,1)
    Stop
  }

ACTOR Nuking_ShrinkingShit : CustomInventory
{
  States
	{
	Pickup:
		TNT1 A 0 A_CheckFlag("ICECORPSE", "Failing")
		TNT1 A 0 A_CheckFlag("BOSS", "Failing")
		TNT1 A 0 A_CheckFlag("NOBLOOD", "Failing")
	LetTheBodiesGetSmall:
		TNT1 A 2 A_SetScale(0.95,0.95)
		TNT1 A 2 A_SetScale(0.90,0.90)
		TNT1 A 2 A_SetScale(0.85,0.85)
		TNT1 A 2 A_SetScale(0.80,0.80)
		TNT1 A 2 A_SetScale(0.70,0.70)
		TNT1 A 2 A_SetScale(0.65,0.65)
		TNT1 A 1 A_SetScale(0.60,0.60)
		TNT1 A 1 A_SetScale(0.55,0.55)
		TNT1 A 1 A_SetScale(0.25,0.25)
		TNT1 A 1 A_SetScale(0.10,0.10)
	Failing:
		TNT1 A 0
		Fail
	}
}
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: It is Shrinker possible to made in GZDoom?

Post by Apeirogon »

Because a_setscale change only visual size of an actor.
To change collision box use a_setssize.
User avatar
Ahpiox
Posts: 98
Joined: Fri Dec 22, 2017 1:52 am

Re: It is Shrinker possible to made in GZDoom?

Post by Ahpiox »

im telling not about this.
Im telling about that actor Nuking_Shrink do not even work.
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: It is Shrinker possible to made in GZDoom?

Post by Apeirogon »

What exactly dont work?
From what you post, Nuking_Shrink dont have projectile combo and 12 is a very small number for radius give function.
User avatar
Ahpiox
Posts: 98
Joined: Fri Dec 22, 2017 1:52 am

Re: It is Shrinker possible to made in GZDoom?

Post by Ahpiox »

Damn, i through 12 will be enough. Thanks for help!
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: It is Shrinker possible to made in GZDoom?

Post by Gez »

You should use ZScript for this kind of effect.

The shrink effect custominventory won't work as expected because all states are processed instantly in CustomInventory item -- the two-tic delay between each step you've coded will be ignored.
User avatar
Ahpiox
Posts: 98
Joined: Fri Dec 22, 2017 1:52 am

Re: It is Shrinker possible to made in GZDoom?

Post by Ahpiox »

Yeah, it's true. But what kind of ZScript, it is a through tic override, new function inside inventory item or what?
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: It is Shrinker possible to made in GZDoom?

Post by Blue Shadow »

In a [wiki=ZScript_virtual_functions#Inventory]DoEffect() override[/wiki]:

Code: Select all

class ShrinkerItem : Inventory
{
    override void DoEffect ()
    {
        // Do shrink stuff...
    }
}
Post Reply

Return to “Scripting”