Advanced Search

Author Topic: The "How do I make a weapon do that?" thread  (Read 91845 times)

0 Members and 1 Guest are viewing this topic.

July 01, 2013, 04:11:14 AM
Reply #420

Offline tsukiyomaru0

  • MM8BDM Extender
  • *
  • Date Registered: November 07, 2010, 05:01:56 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #420 on: July 01, 2013, 04:11:14 AM »
Quote from: "Zard1084"
Quote from: "tsukiyomaru0"
Quote from: "Zard1084"
Edit: wait i have a idea! i can make one projectile shootable and if it gets hit by a special damage type the shot dies and spawns the newer more powerful projectile!
There's only one problem with this: It doesn't tell who shot the projectile.
i know that tuski i was just gonna do that so i can just get it working and then revamp it to work with acs or some other thing later
Hm, maybe if you find a way to have it execute a script to contrast the TID of its master with that of the one who just shot the second projectile at it...

July 01, 2013, 07:19:37 AM
Reply #421

Offline Hallan Parva

  • MM8BDM MM8 Contributor

  • drifting absently across an endless sea
  • *
  • Date Registered: September 23, 2010, 10:32:40 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #421 on: July 01, 2013, 07:19:37 AM »
really really noob-tier question


I want to make a projectile turn into / spawn another projectile with the exact same angle as the first.
For some reason, my X projectile spawns the Y projectile, but it loses its vertical pitch, and I have no clue why.
(e.g. it just flies straight and doesn't go up or down even if X projectile was already going up or down)

I tried stealing lines of Decorate from every weapon pack I could think of, but to no avail. So now I'm asking here.

July 01, 2013, 07:26:41 AM
Reply #422

Offline tsukiyomaru0

  • MM8BDM Extender
  • *
  • Date Registered: November 07, 2010, 05:01:56 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #422 on: July 01, 2013, 07:26:41 AM »
Quote from: "SmashBroPlusB"
really really noob-tier question


I want to make a projectile turn into / spawn another projectile with the exact same angle as the first.
For some reason, my X projectile spawns the Y projectile, but it loses its vertical pitch, and I have no clue why.
(e.g. it just flies straight and doesn't go up or down even if X projectile was already going up or down)

I tried stealing lines of Decorate from every weapon pack I could think of, but to no avail. So now I'm asking here.

There's this:
Code: [Select]
A_SpawnItemEx("subprojectilename",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM)
And, for a 45 angle but maintaining previous speed:
Code: [Select]
A_SpawnItemEx("subprojectilename",0,0,0,momx-(momy*0.7),momy+(momx*0.7),momz,0,SXF_ABSOLUTEMOMENTUM)

July 01, 2013, 03:52:38 PM
Reply #423

Offline Gummywormz

  • Standard Member

  • Air Man Tile Enthusiast
  • Date Registered: December 23, 2010, 01:05:44 AM

    • View Profile
    • Github Page
Re: The "How do I make a weapon do that?" thread
« Reply #423 on: July 01, 2013, 03:52:38 PM »
Quote from: "tsukiyomaru0"
There's this:
Code: [Select]
A_SpawnItemEx("subprojectilename",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM)

There's one problem with that. 0 is not defined as always being forwards. So firing the projectile at different parts of the map causes it to go sideways or backwards. I'd like a working example of this for my weapon pack's fade launcher.

July 01, 2013, 07:26:31 PM
Reply #424

Offline tsukiyomaru0

  • MM8BDM Extender
  • *
  • Date Registered: November 07, 2010, 05:01:56 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #424 on: July 01, 2013, 07:26:31 PM »
Quote from: "Gummywormz"
Quote from: "tsukiyomaru0"
There's this:
Code: [Select]
A_SpawnItemEx("subprojectilename",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM)

There's one problem with that. 0 is not defined as always being forwards. So firing the projectile at different parts of the map causes it to go sideways or backwards. I'd like a working example of this for my weapon pack's fade launcher.

Because you forgot SXF_AbsoluteMomentum. Without the flag, X speed is forward/backward speed, Y is sideways and Z is vertical, where angle defines if the projectile will move into another direction. With the flag, the speeds are directly bound to the axis, so X will always be West to East, Y will be South to North and Z will be vertical. The angle, if you use SXF_AbsoluteMomentum, just serves to make the actor look at a specific direction while moving.

July 02, 2013, 12:15:54 AM
Reply #425

Offline Davregis

  • Standard Member
  • Date Registered: August 16, 2011, 07:44:46 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #425 on: July 02, 2013, 12:15:54 AM »
How am I supposed to make a weapon work as a pickup for a different weapon e.g. CSCC Gizmo

>How do I make a weapon give me another weapon on pickup, but only allow certain weapons to be picked up?

July 02, 2013, 12:24:09 AM
Reply #426

Offline tsukiyomaru0

  • MM8BDM Extender
  • *
  • Date Registered: November 07, 2010, 05:01:56 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #426 on: July 02, 2013, 12:24:09 AM »
Quote from: "Daveris"
How am I supposed to make a weapon work as a pickup for a different weapon e.g. CSCC Gizmo

>How do I make a weapon give me another weapon on pickup, but only allow certain weapons to be picked up?
I've thought about this several times... That ZDN mod, Samsara, has this. Kind of.

July 07, 2013, 04:02:16 PM
Reply #427

Offline Shageta

  • Standard Member
  • Date Registered: May 05, 2013, 04:11:19 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #427 on: July 07, 2013, 04:02:16 PM »
Im just gonna ask .... How can i make an ALT FIRE weapon that zoom in when holding alt fire  :P

July 07, 2013, 04:56:02 PM
Reply #428

Offline Korby

  • Global Moderator

  • Benvenuto nella room italiana!
  • *************
  • Date Registered: March 04, 2010, 03:36:02 AM

    • View Profile
    • Korby Games
Re: The "How do I make a weapon do that?" thread
« Reply #428 on: July 07, 2013, 04:56:02 PM »
Quote from: "Zard1084"
Quick question this may have been asked before.... i'm trying to figure out how to have two shots combine into a single new shot much like the x buster upgrade for X3? can anyone help with that?

Going by what I saw in the video, couldn't you just have your giant charge shot have a pain state for the mid charge that makes them go to a second spawn/existing state that increases the speed[change velocity shenanigans]?To get increased damage, Uki mentioned something about a very small explosion radius on death for extra damage so that if you hit someone, you'll get extra damages.

Quote from: "Shageta"
Im just gonna ask .... How can i make an ALT FIRE weapon that zoom in when holding alt fire  :P
http://zdoom.org/wiki/A_ZoomFactor

Use it on the AltHold state and you'll only zoom in while holding altfire.

July 07, 2013, 06:19:10 PM
Reply #429

Offline Russel

  • MM8BDM Extender

  • Doc Croc
  • **********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #429 on: July 07, 2013, 06:19:10 PM »
You would have to place the A_ZoomFactor prior to A_Refire.
I believe calling it a second time with (1.0) as the argument will remove this effect.

Just to make a small amendment to what Korby here said~

July 19, 2013, 08:48:58 PM
Reply #430

Offline Colonel ServBot

  • Standard Member
  • Date Registered: August 30, 2012, 02:54:19 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #430 on: July 19, 2013, 08:48:58 PM »
Well, I tried making a Projectile home in on people and bots. But it keeps giving me random errors when I load the mod, Heres the projectile code.
Code: [Select]
actor ColonelBusterShot
{
speed 10
damage 2
 +RIPPER
 +SEEKERMISSILE
 +LOOKALLAROUND
 +DOOMBOUNCE
 +NOBLOOD
deathsound "sounds/clawhit"
seesound "weapon/mbuster"
PROJECTILE
states
{
Spawn:
BUST A 1 A_SeekerMissile
loop
Death:
    BUST A 0    
}
}

And no, the Buster Shot sprites are just a place holder, but how do I make this work?
Sorry for NecroBumping.

July 19, 2013, 08:56:05 PM
Reply #431

Offline tsukiyomaru0

  • MM8BDM Extender
  • *
  • Date Registered: November 07, 2010, 05:01:56 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #431 on: July 19, 2013, 08:56:05 PM »
Quote from: "Colonel ServBot"
Well, I tried making a Projectile home in on people and bots. But it keeps giving me random errors when I load the mod, Heres the projectile code.
Code: [Select]
actor ColonelBusterShot
{
speed 10
damage 2
 +RIPPER
 +SEEKERMISSILE
 +LOOKALLAROUND
 +DOOMBOUNCE
 +NOBLOOD
deathsound "sounds/clawhit"
seesound "weapon/mbuster"
PROJECTILE
states
{
Spawn:
BUST A 1 A_SeekerMissile
loop
Death:
    BUST A 0    
}
}

And no, the Buster Shot sprites are just a place holder, but how do I make this work?
Sorry for NecroBumping.
Death does not stop

August 03, 2013, 09:22:06 PM
Reply #432

Offline Colonel ServBot

  • Standard Member
  • Date Registered: August 30, 2012, 02:54:19 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #432 on: August 03, 2013, 09:22:06 PM »
Oh, thats what I was missing! Thanks Tsuki! I'll add that now!
I feel stupid now, lol.

Okay, after nine million years of procrastination, i tested it.
Here's the new code for the projectile.
(click to show/hide)

And this is the error i get.
Code: [Select]
Execution could not continue.

Script error, "Colbuster.pk3:code/colonelbusternew.txt" line 76:
Expected '(', got 'loop'.

This is what I don't understand. even if the code is updated.

Also, How do you make a Melee weapon with Combos? Like Gizmo's Class' Claw gloves?
I already found out how to make a Melee weapon's projectiles(No, not by looking at Slash Claws code), but how do you make so it can attack by combo's?

August 03, 2013, 09:34:51 PM
Reply #433

Offline tsukiyomaru0

  • MM8BDM Extender
  • *
  • Date Registered: November 07, 2010, 05:01:56 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #433 on: August 03, 2013, 09:34:51 PM »
I'm pretty sure that A_SeekerMissile requires at least one parameter.

August 03, 2013, 09:57:06 PM
Reply #434

Offline Colonel ServBot

  • Standard Member
  • Date Registered: August 30, 2012, 02:54:19 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #434 on: August 03, 2013, 09:57:06 PM »
Quote from: "tsukiyomaru0"
I'm pretty sure that A_SeekerMissile requires at least one parameter.

How do I do that?
And whats a Parameter in this engine. Also, I'm sorry if this all sounds Noob-Tier. I'mjust an idiot who knows nothing about Decorate or ACS.