Donthurtshooter help!!!

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
Tibi19920727
Posts: 9
Joined: Sun Jan 15, 2017 1:14 am

Donthurtshooter help!!!

Post by Tibi19920727 »

Hi guys,i would like to ask,why i still hurt myself,when I added DonthurtShooter into this missile??
Here's the whole code,with weapon,the problem with this projectile,when i added this property and i still hurt myself,but i want the opposite.....

Code: Select all

Actor Q2Rocket : Rocket
{
	Speed 20
	Damage 25
	Projectile
	-ROCKETTRAIL +BRIGHT 
	+FORCERADIUSDMG
	Donthurtshooter
	DeathSound "Weapons/RocketExplosion"
	//Decal Scorch
	States
	{
	Spawn:
		MIS1 AAAAA 0 A_SpawnItemEx(Q2GrenadeSmoke,Random2(5),0,Random2(5),0,0,FRandom(0.1,0.5),Random(1,360),0,128)
		MIS1 A 0 A_SpawnItemEx(Q2RocketTrail,0,0,0,FRandom(0,0.5),0,FRandom(-0.5,0),Random(1,360),128)
		MIS1 A 1 Light(ROCKET) A_PlaySound("Weapons/RocketFly",CHAN_VOICE,0.66,1)
		Loop
	Death:
	MIS1 A 5 A_Explode
		MIS1 A 0 A_PlaySound("Weapons/GrenadeExplosion")
		MIS1 A 0 A_SpawnItem(Q2Explosion)
		Stop
	}
}
Actor Q2RocketTrail : Q2GrenadeSmoke { Translation "80:111=160:167" }
Actor Q2RocketLauncher : Q2Weapon
{
	Tag "Rocket Launcher"
	Inventory.PickupMessage "Rocket Launcher"
	Inventory.PickupSound "Q2Misc/W_Pkup"
	Weapon.SelectionOrder 500
	Weapon.AmmoGive 5
	Weapon.AmmoType Q2Rockets
	Weapon.AmmoUse 1
	Weapon.SlotNumber 7
	Inventory.Icon "W_RLNCHR"
	+INVENTORY.ALWAYSPICKUP
	States
	{
	Spawn:
		RLAU A -1
		Stop
	Raise:
		RCK0 ABCDE 4
		Goto Ready+1
	Deselect:
		RCK0 N 2
		RCK1 WXYZ 3
		Goto InstantDeselect
	Ready:
		TNT1 A 0 A_Jump(32,2)
		RCK0 N 1 A_WeaponReady
		Loop
		RCK0 "OPQRSTUVWXYZ[^]" 5 A_WeaponReady
		RCK1 ABCDEFGHIJKLMNOPQRSTUV 5 A_WeaponReady
		Goto Ready+1
	Fire:
		TNT1 A 0 A_JumpIfInventory(PowerSilencer,1,4)
		TNT1 A 0 A_AlertMonsters
		RCK0 N 2 A_PlaySound("Weapons/RocketLauncherFire",CHAN_WEAPON)
		RCK0 F 0 A_Jump(256,2)
		RCK0 N 2 A_PlaySound("Weapons/RocketLauncherFire",CHAN_WEAPON,0.5,0,3)
		RCK0 F 0 A_FireCustomMissile(Q2Rocket,0,1,4,3)
		RCK0 F 3 A_GunFlash
		RCK0 G 3
		RCK0 H 0 A_JumpIfInventory(PowerSilencer,1,4)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_PlaySound("Weapons/RocketLauncherLoad",0)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_PlaySound("Weapons/RocketLauncherLoad",0,0.5,0,3)
		RCK0 HIJ 3
		RCK0 KLM 5
		Goto Ready
	DFire:
		RCK0 HIJK 3
		RCK0 LM 5 A_WeaponReady
		Goto Ready
	Flash:
		TNT1 A 1 A_Light2
		TNT1 A 0 A_Light1
		Goto LightDone
	}
}
Last edited by Tibi19920727 on Thu Sep 28, 2017 11:00 pm, edited 1 time in total.
User avatar
ramon.dexter
Posts: 1520
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Donthurtshooter help!!!

Post by ramon.dexter »

Please, format your code as a code...Also, put some empty spaces inbetween the actors...This is just pile of unformatted text...

Also, you have to be more specific - are you hurt by the damage splash, or are you damaged when the missile hits you? Try to look at it from our side - are you able to give an answer to this question without further questions?
Tibi19920727
Posts: 9
Joined: Sun Jan 15, 2017 1:14 am

Re: Donthurtshooter help!!!

Post by Tibi19920727 »

I damaged,when a missile hits on impact
User avatar
ramon.dexter
Posts: 1520
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Donthurtshooter help!!!

Post by ramon.dexter »

When the missile hits you? Or when the missile hits the enemy? You want the weapon to heal you, when you hit enemy?
Tibi19920727
Posts: 9
Joined: Sun Jan 15, 2017 1:14 am

Re: Donthurtshooter help!!!

Post by Tibi19920727 »

When missile hits enemy
User avatar
Jekyll Grim Payne
 
 
Posts: 1065
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Donthurtshooter help!!!

Post by Jekyll Grim Payne »

Please, edit your post, select your code entry and press "code" to format it appropriately.

Now, "donthurtshooter" is a deprecated property. Try using A_Explode(128,128,0) instead of A_Explode in the rocket's definition.
Tibi19920727
Posts: 9
Joined: Sun Jan 15, 2017 1:14 am

Re: Donthurtshooter help!!!

Post by Tibi19920727 »

Thanks for help,but it didn't work...............
User avatar
Jekyll Grim Payne
 
 
Posts: 1065
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Donthurtshooter help!!!

Post by Jekyll Grim Payne »

Well, I think at this point we'll have to take a look at your wad. If the player is the one firing the weapon, the rocket shouldn't hurt them.
Tibi19920727
Posts: 9
Joined: Sun Jan 15, 2017 1:14 am

Re: Donthurtshooter help!!!

Post by Tibi19920727 »

Why? the whole code can be found up there the first post
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Donthurtshooter help!!!

Post by wildweasel »

Tibi19920727 wrote:Why? the whole code can be found up there the first post
It's entirely possible that your code isn't the problem. It'd be easier to give us a ready-to-run file that exhibits the error than to have us piece it together.
Locked

Return to “Editing (Archive)”