Recreating the pig/chicken

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
Lumpy
Posts: 256
Joined: Tue Jul 15, 2003 5:29 pm
Location: Pa,USA
Contact:

Recreating the pig/chicken

Post by Lumpy »

If I was to make my own morphed player class how would I prevent a player in that state from picking up items like the chicken/pig.
User avatar
Lumpy
Posts: 256
Joined: Tue Jul 15, 2003 5:29 pm
Location: Pa,USA
Contact:

Post by Lumpy »

Maybe it would help if I went into a better explination.

First this

Code: Select all

ACTOR ShrunkPlayer : PlayerPawn
{
	Speed 1
	Health 25
	Radius 4
	Height 14
	Mass 25
	PainChance 255
	Scale 0.25
	+NOSKIN
	Player.ColorRange 112, 127
	Player.CrouchSprite "PLYC"
	Player.StartItem "Fist"
	player.viewheight 10
	player.jumpz 2
	
	States
	{
	Spawn:
		PLAY A -1
		Loop
	See:
		PLAY ABCD 4 
		Loop
	Missile:
		PLAY E 12 
		Goto Spawn
	Melee:
		PLAY F 6 BRIGHT
		Goto Missile
	Pain:
		PLAY G 4 
		PLAY G 4 A_Pain
		Goto Spawn
	Death:
		PLAY H 10 A_PlayerSkinCheck(AltSkinDeath)
		PLAY I 10 A_PlayerScream
		PLAY J 10 A_NoBlocking
		PLAY KLM 10
		PLAY N -1
		Stop
	XDeath:
		PLAY O 5 A_PlayerSkinCheck(AltSkinXDeath)
		PLAY P 5 A_XScream
		PLAY Q 5 A_NoBlocking
		PLAY RSTUV 5
		PLAY W -1
		Stop
	}
}
Basically it is a class used with a custom morph projectile that is shot out of a weapon (a shrink ray). It is purely for deathmatch only, and what I want to do is prevent anybody morphed into this from picking up items like the chicken/pig. Cuz it is really weird seeing something that small shoot out a rocket twice as big as it.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Post by XutaWoo »

Use MorphPlayer instead of PlayerPawn I think.
User avatar
Virtue
Posts: 919
Joined: Sun Nov 19, 2006 8:15 am
Location: Manchester UK

Post by Virtue »

shrinkray, good idea
User avatar
Lumpy
Posts: 256
Joined: Tue Jul 15, 2003 5:29 pm
Location: Pa,USA
Contact:

Post by Lumpy »

MorphPlayer, and MorphedPlayer do not work. I do have it figured out somewhat. Here is what I did.

Code: Select all

actor ShrinkRay : Weapon 3181
{
  radius 20 
  height 16
  inventory.pickupmessage "You got the Shrinker"
  weapon.selectionorder 2500
  weapon.kickback 100
  weapon.ammotype "RocketAmmo"
  weapon.ammouse 1
  weapon.ammogive 2
  +WEAPON.NOAUTOFIRE
  +WEAPON.EXPLOSIVE
  states
  {
  Ready:
    SHNK A 1 A_WeaponReady
    loop
  Deselect:
    SHNK A 1 A_Lower
    loop
  Select:
    SHNK A 1 A_Raise
    loop
  Fire:
    SHNK A 0 A_GunFlash
        SHNK A 12 A_FireCustomMissile ("ShrinkShot")
    SHNK B 4
    SHNK C 4 A_ReFire
    goto Ready
  AltFire:
    SHNK A 3
    SHNK A 0 A_FireBullets (11.2, 7.1, 20, 5, "BulletPuff")
    SHNK A 0 A_PlayWeaponSound ("weapons/sshotf")
    SHNK A 7 A_GunFlash
    SHNK B 7
    SHNK B 7 A_CheckReload
    SHNK B 7 A_PlayWeaponSound ("weapons/sshoto")
    SHNK B 7
    SHNK B 7 A_PlayWeaponSound ("weapons/sshotl")
    SHNK B 6
    SHNK B 0 A_PlayWeaponSound ("weapons/sshotc")
    SHNK C 6 A_ReFire
    goto Ready
  Hold:
    SHNK A 0 A_GunFlash
            SHNK A 12 A_FireCustomMissile ("ShrinkShot")
                SHNK B 4
    SHNK C 4 A_ReFire
    goto Ready
  Flash:
	BLNK A 0
    stop
  Spawn:
    SHNK Z -1
    stop
  }
}

ACTOR Shrinkshot : MorphProjectile
{
	Speed 40
	MorphProjectile.PlayerClass "ShrunkPlayer"
	seesound "shrinker"
	deathsound "woot"
	PROJECTILE
	-NOTELEPORT
	States
	{
	Spawn:
    	SHNK DE 4 BRIGHT
    	loop
	}
}

actor MiniPuff : BulletPuff
{
  spawnid 131
  renderstyle Translucent
  alpha 0.5
  scale 0.5
  +NOBLOCKMAP
  +NOGRAVITY
  states
  {
  Spawn:
    PUFF A 4 bright
    PUFF B 4
  Melee:
    PUFF CD 4
    stop
  }
}

actor Boot : Weapon
{
  obituary "%o chewed on %k's boot."
  weapon.kickback 100
  +WEAPON.WIMPY_WEAPON
  +WEAPON.MELEEWEAPON
  states
  {
  Ready:
    PUNG A 1 A_WeaponReady
    loop
  Deselect:
    PUNG A 1 A_Lower
    loop
  Select: 
    PUNG A 1 A_Raise
    loop
  Fire:
    PUNG B 4
    PUNG C 4 A_CustomPunch (2, 1, 1, "MiniPuff", 0) 
    PUNG D 5
    PUNG C 4
    PUNG B 5 A_ReFire
    goto Ready
  }
}

ACTOR ShrunkPlayer : PlayerPawn
{
	Speed 1
	Health 25
	Radius 4
	Height 14
	Mass 25
	PainChance 255
	Scale 0.25
	+NOSKIN
	Player.ColorRange 112, 127
	Player.CrouchSprite "PLYC"
	Player.StartItem "Boot"
	player.viewheight 10
	player.jumpz 2
	
	States
	{
	Spawn:
		PLAY A -1
		Loop
	See:
		PLAY ABCD 4
		PLAY A 0 A_GiveInventory("Boot", 1)
		PLAY A 0 A_SelectWeapon("Boot")	
		Loop
	Missile:
		PLAY E 12 
		Goto Spawn
	Melee:
		PLAY F 6 BRIGHT
		Goto Missile
	Pain:
		PLAY G 4 
		PLAY G 4 A_Pain
		Goto Spawn
	Death:
		PLAY H 10
		PLAY I 10 A_PlayerScream
		PLAY J 10 A_NoBlocking
		PLAY KLM 10
		PLAY N -1
		Stop
	XDeath:
		PLAY O 5
		PLAY P 5 A_XScream
		PLAY Q 5 A_NoBlocking
		PLAY RSTUV 5
		PLAY W -1
		Stop
	}
}
I am sorry if that is not a collapsible code box I have no idea how to do those.

OK the first item is the weapon. It's primary fire shoots the morphing projectile. It's altfire is pretty much a shotgun blast. The second item is the projectile. The third item is a scaled down bullet puff that is used by the fourth item. The fourth item is the weapon you will be using when you are morphed.

Now for the fifth item, my new player class. All it is, is a scaled down marine. But it has some problems.

1. Player.StartItem "Boot" does nothing what so ever. It just still in there cuz I am to lazy to take it out. I'm guessing that it is more for a normal player class that you would start a game out with.

2. Because of the above I had to add the two lines in the see state to give, and select the weapon. I thought that it would of made more sense to be in the spawn state, but no matter where I put them in the spawn state, or what duration I give them, they will not work in the spawn state.

3. You still retain the weapons, and ammo you had in your unmorphed form. Not sure about other inventory items.

4. Because of numbers 2 and 3 if you don't walk you can select a weapon and fire away. Once you walk you are given the boot , and it is selected for you.

5. You can still pick up weapons. You cannot use them cuz you are stuck using the boot. But I do know that the pig, and chicken cannot pick up weapons. Not sure if they (pig/chicken) can pick up ammo, health or other inventory items.

If there was a way to give and select the boot half of my problems would go away. But the fact that you can still pick up weapons erks me alot. It's just to weird seeing this little guy pick up weapons that are anywhere from 8 to 14 times bigger than he is.
dennisj1
Posts: 399
Joined: Sun Jan 11, 2004 1:46 pm
Location: Superior, WI

Post by dennisj1 »

Boot for a weapon, and a shrinkray? Are you triing to recreate Duke3D?
User avatar
Enjay
 
 
Posts: 26945
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Your question, I dunno, but a code box that you can collapse, you need spoiler tags
Spoiler:

Code: Select all

[spoiler]See, this is in a spoiler box made by using the following code.[/spoiler]
User avatar
Lumpy
Posts: 256
Joined: Tue Jul 15, 2003 5:29 pm
Location: Pa,USA
Contact:

Post by Lumpy »

dennisj1 wrote:
Boot for a weapon, and a shrinkray? Are you triing to recreate Duke3D?
Actually no. This is just for a deathmatch weapon mod I play with my friends. Unfortunately I myself like the Nukem weapons so there are quite a few of his weapons in there. But there is still the original Doom weapons, some were modified and given altfire modes. An example of which is the shotgun's altfire is it uses the explosion for a puff. The BFG's altfire is a little time bomb that you leave behind that explodes using the death frame of the projectile the mauler2 uses. A sprite replacement for the wraitherverge is in there (I hope I spelled that right). There is also the pulse cannon, and timebomb from metriod,. Megabuster, crashbombs, magnet missiles from the megaman series. And the fire flower from mario brothers. But there are alot of original ideas in this thing to.

1. A sheild that makes the user eflective.
2. A knife with an altfire that makes the user totally invisible.
3. A pig morpher, altfire launches a pig
4. A cow launcher, altfire cow pie launcher.
5. A nuke. It's projectile uses A_BrainExplode every othe frame so it pretty much kills every thing in it's path.
6. A nail gun, alt fire is you shoot a ball that explodes into nails that fly off in random directions.
7. Etc...Etc...Etc...

Also thanks Enjay I thought they were code boxes.

And again anybody have an idea of how I can fix this.

1. I want the player to be given his boot as he is spawned in his shrunken state.

2. I want to stop the shrunken player from picking up weapons. If that means they would not be able to pick-up anything at all I'll be ok with that as a result.
Locked

Return to “Editing (Archive)”