Making a Rock Weapon

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.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Making a Rock Weapon

Post by XutaWoo »

How do you make a weapon the doesn't auto aim, and thrown at an arc? It's a grenade (even though I said rock) throwing attack.
ant1991331
Posts: 598
Joined: Fri Jun 24, 2005 3:19 am
Location: Makin tracks with jetboots

Post by ant1991331 »

Try this for a template:

Code: Select all

Actor Fumbler : Weapon 20012
{
  obituary "%o fumbled over %k's grenade."
  radius 20
  height 16
  inventory.pickupmessage "You got the Fumbler Grenade Launcher!"
  weapon.selectionorder 9
  weapon.kickback 100
  weapon.ammotype "FumblerAmmo"
  weapon.ammouse 1
  weapon.ammogive 8
  AttackSound "grenade/fire"
  Scale 0.25
  states
  {
  Ready:
    FUMB A 1 A_WeaponReady
    loop
  Deselect:
    FUMB A 1 A_Lower
    loop
  Select:
    FUMB A 1 A_Raise
    loop
  Fire:
    FUMB E 3
    FUMB F 0 BRIGHT A_PlayWeaponSound("grenade/fire")
    FUMB F 3 BRIGHT A_FireCustomMissile("FumblerGrenade",2,1,8,3)
    FUMB GH 3
    FUMB A 0 A_CheckReload
    FUMB ABCDEA 3
    FUMB A 2 A_ReFire
    goto Ready
  Spawn:
    FUMP A -1
    stop
  }
}
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 »

I said throwing grenades, though.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Post by Matt »

You can have the grenade spawn with ThrustThingZ to start moving at a vertical angle.

For thrown grenades, you'd basically do the same with graphics for the arm throwing the grenade, and either have all instances of the ammo include the "weapon" or create a new playerclass starting out with the "weapon".

If you want to get fancy, I suspect you could use some combination of A_Refire, A_GiveInventory and A_JumpIfInventory to throw different grenades depending on how long you hold down the fire key, each grenade differing in initial force but otherwise exploding similarly.
ant1991331
Posts: 598
Joined: Fri Jun 24, 2005 3:19 am
Location: Makin tracks with jetboots

Post by ant1991331 »

XutaWoo wrote:I said throwing grenades, though.
Grenadelauncher, throwing grenades. Not much difference.
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 »

@Vaecius: Buh? I mean using my grenade base, adding Sersious Sam 2-type grenades, which don't have animations being thrown, just appear, moving in an arc. Of course, there's no auto-aiming in that game, so they're just thrown in an arc. That's what I mean.


@ant Number-Alot: I said in an arc also. Also, I'll use that for rocket-shooting weapons, (Like Double-Cannon Rocket Launcher, Triple-Cannon Launcher) because of fact they are like grenade launchers.
User avatar
Enjay
 
 
Posts: 27140
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Making a Rock Weapon

Post by Enjay »

XutaWoo wrote:Making a Rock Weapon
An obvious response...

Image
Sorry. :oops:
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 »

LOLOLOLOLOLOLOLOLOL!
[/offtopic]
Anyway, do you have any idea how to do this, Enjay?
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia
Contact:

Re: Making a Rock Weapon

Post by David Ferstat »

Enjay wrote: Sorry. :oops:
No you ain't.

Smart-arse. :)
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Post by Matt »

I always have autoaim turned off so what you're describing is exactly what happens when I play with your grenade base, so it took me a moment to realize what you meant here...

Yeah, I have no idea how to force it off. Maybe you could just tell people to turn it off when they play your mod...?
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 »

What about the other weapons? I want all others to autoaim (if on)...hm...Feature Suggesting time?
User avatar
Enjay
 
 
Posts: 27140
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Making a Rock Weapon

Post by Enjay »

David Ferstat wrote:No you ain't.

Smart-arse. :)
Damn, you got me. ;)
XutaWoo wrote:Anyway, do you have any idea how to do this, Enjay?
No, sorry I don't. How is the aim paramter of A_FireCustomMissile supposed to work? The Wiki doesn't seem to explain it. Might that be where the answer lies?

http://www.zdoom.org/wiki/index.php?tit ... tomMissile
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Post by Matt »

From what I understand of this explanation and my own observations, aimmode 0 means that the angle only takes efffect after the projectile is already in front of you.
Last edited by Matt on Thu May 31, 2007 12:54 am, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49238
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Completely wrong. ;)

The difference is not the launching point but the trajectory. One mode aims directly at the target the other ones aims at a trajectory parallel from the center of the shooter to the target on the z-axis.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Post by Matt »

EDIT: Right, autoaim.

So, in other words:

Mode 0: A line is drawn from the player to the autoaim target. The projectile's angle is adjusted so that its Z angle matches this new line. Used if all you want is to adjust for a lack of vertical aiming.

Mode 1: The projectile's line is drawn. It is adjusted, if close enough, so that it heads directly towards the target. The projectile then fires at this new angle. Used if you want to adjust for a general inability to aim (e.g., a multishot weapon that needs to affect multiple enemies at once).
Locked

Return to “Editing (Archive)”