Page 1 of 1

[SOLVED] Weapon blocks all actors

Posted: Sun Apr 20, 2014 11:32 pm
by Fabysk
Is it possible to make a weapon that blocks Actors? I went ahead and created the weapon.

[spoiler]

Code: Select all

ACTOR AssaultSheild : Weapon 10031
{
  Game Doom
  Weapon.SelectionOrder 3700
  Weapon.Kickback 200
  +NOAUTOFIRE
  States
  {
  Ready:
    SHLD A 1 A_WeaponReady
    Loop
  Deselect:
    SHLD A 1 A_Lower
    Loop
  Select:
    SHLD A 1 A_Raise
    Loop
  Fire:
    SHLD B 2
    SHLD C 2
    SHLD D 2
    SHLD E 2
    SHLD F 2
    SHLD G 3 A_CustomPunch(60, 0, 0, "Sheild_Hit")
    SHLD H 2
    SHLD I 2
    SHLD J 2
    SHLD K 2
    SHLD L 3
    Goto Ready
  }
}
[/spoiler]

This is obviously a Riot Shield

RE: Weapon blocks all actors

Posted: Mon Apr 21, 2014 9:30 am
by Lollipop
All I can say is to try and dig into brutal hexen and look really

RE: Weapon blocks all actors

Posted: Mon Apr 21, 2014 12:52 pm
by Dusk
A weapon doesn't really exist in the map other than as a pickup. The ready/select/deselect/fire states are actually called by the player.

You could try a couple of approaches:
  • spawn blocking actors in an arc in front of the player in formation of the shield, spawn them with ACS every tic and make them last for only that tic
  • use the 2.0 alpha build and use A_Blast, though this will blast everything around the player.
  • spawn A_Blast-calling actors in an arc in front of the player? Might cause trouble.

RE: Weapon blocks all actors

Posted: Tue Apr 22, 2014 5:00 am
by Fabysk
Lollipop wrote: All I can say is to try and dig into brutal hexen and look really
I have found the weapon BattleAxe that uses the "ShieldDefense" Actor. I have tried to put it in, modifying it where it just blocks actors, but it results in doing absolutly nothing. What about making the incoming actors being pushed away. Using A_RadiusThrust works fine, but it also pushes the player. Sadly, RTF_AFFECTSOURCE doesn't work anymore. How do I make this possible with just the weapon pushing actors away a few feet?

RE: Weapon blocks all actors

Posted: Tue Apr 22, 2014 7:42 am
by CloudFlash
Fabysk wrote: Using A_RadiusThrust works fine, but it also pushes the player.
If memory serves, GvH had similar problems, which was solved by increasing the mass of player classes. See if it works in your case.

RE: Weapon blocks all actors

Posted: Tue Apr 22, 2014 11:45 pm
by Fabysk
CloudFlash wrote: If memory serves, GvH had similar problems, which was solved by increasing the mass of player classes. See if it works in your case.
Thank you CloudFlash. Changing the mass of the player solved my problem.