Donthurtshooter help!!!

Discuss all aspects of editing for ZDoom.
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.

Donthurtshooter help!!!

Postby Tibi19920727 » Wed Sep 27, 2017 5:32 am

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 allExpand view
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 Fri Sep 29, 2017 12:00 am, edited 1 time in total.
Tibi19920727
 
Joined: 15 Jan 2017

Re: Donthurtshooter help!!!

Postby ramon.dexter » Wed Sep 27, 2017 5:46 am

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?
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: Donthurtshooter help!!!

Postby Tibi19920727 » Wed Sep 27, 2017 5:53 am

I damaged,when a missile hits on impact
Tibi19920727
 
Joined: 15 Jan 2017

Re: Donthurtshooter help!!!

Postby ramon.dexter » Wed Sep 27, 2017 11:06 am

When the missile hits you? Or when the missile hits the enemy? You want the weapon to heal you, when you hit enemy?
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: Donthurtshooter help!!!

Postby Tibi19920727 » Wed Sep 27, 2017 11:10 pm

When missile hits enemy
Tibi19920727
 
Joined: 15 Jan 2017

Re: Donthurtshooter help!!!

Postby Jekyll Grim Payne » Thu Sep 28, 2017 5:00 pm

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.
User avatar
Jekyll Grim Payne
 
Joined: 21 Jul 2008

Re: Donthurtshooter help!!!

Postby Tibi19920727 » Fri Sep 29, 2017 5:01 am

Thanks for help,but it didn't work...............
Tibi19920727
 
Joined: 15 Jan 2017

Re: Donthurtshooter help!!!

Postby Jekyll Grim Payne » Fri Sep 29, 2017 9:35 am

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.
User avatar
Jekyll Grim Payne
 
Joined: 21 Jul 2008

Re: Donthurtshooter help!!!

Postby Tibi19920727 » Sun Oct 01, 2017 1:33 pm

Why? the whole code can be found up there the first post
Tibi19920727
 
Joined: 15 Jan 2017

Re: Donthurtshooter help!!!

Postby wildweasel » Sun Oct 01, 2017 1:35 pm

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.
User avatar
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003


Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 2 guests