Advanced Search

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

0 Members and 1 Guest are viewing this topic.

September 05, 2011, 04:14:41 PM
Reply #45

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 #45 on: September 05, 2011, 04:14:41 PM »
I want to make a ground-based weapon like Bubble Lead or Wind Storm. The projectile's supposed to do 15 damage. However, for some reason the infamous "bubble doubling" occurs and shots do 30 damage instead! How do I prevent this from happening?

Code: [Select]
actor BubblerAttack
{
obituary "????? it's a secret! Can't reveal it yet."
-SOLID
PROJECTILE
-NOGRAVITY
Damage (15)
Height 16
Radius 20
Scale 2.5
gravity 1.0
speed 15
States
{
Spawn:
BUBB A 4
BUBB A 0 A_GiveInventory("Clip",1)
BUBB BCB 4
loop
Death:
TNT1 A 0 A_JumpIfInventory("Clip",1,"Continue")
TNT1 A 1
stop
Continue:
TNT1 A 0  A_CustomMissile("BubblerAttack",0,0,0,2,0)
TNT1 A 1
stop
}
}

September 05, 2011, 04:16:32 PM
Reply #46

Offline Max

  • MM8BDM Extender

  • i ate those food
  • ************
  • Date Registered: July 09, 2010, 08:10:13 PM

    • View Profile
    • ??
Re: The "How do I make a weapon do that?" thread
« Reply #46 on: September 05, 2011, 04:16:32 PM »
What the bubble lead does is continue on death. So when it hits an actor, it still continues. Adding

Code: [Select]
Crash:
TNT1 A 1
Stop

Should fix it, as crash is the state entered when hitting a player.

September 05, 2011, 04:21:27 PM
Reply #47

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 #47 on: September 05, 2011, 04:21:27 PM »
Alright, new question.

Suppose I put actual sprites in Crash instead of a transparent one. Would these sprites "play" when the Bubbler hits a player? I'm asking because I want the "foam" from the Bubbler to only play when it hits a player.

EDIT: I'm aware of the Death vs XDeath question above. I was just curious about Crash to see if it'll save some steps.

September 05, 2011, 04:23:23 PM
Reply #48

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 #48 on: September 05, 2011, 04:23:23 PM »
Crash is what happens when it hits a floor if I remember correctly.

September 05, 2011, 04:25:05 PM
Reply #49

Offline Max

  • MM8BDM Extender

  • i ate those food
  • ************
  • Date Registered: July 09, 2010, 08:10:13 PM

    • View Profile
    • ??
Re: The "How do I make a weapon do that?" thread
« Reply #49 on: September 05, 2011, 04:25:05 PM »
Quote from: "SmashBroPlusB"
Alright, new question.

Suppose I put actual sprites in Crash instead of a transparent one. Would these sprites "play" when the Bubbler hits a player? I'm asking because I want the "foam" from the Bubbler to only play when it hits a player..

Yes

Quote from: "Gummywormz"
Crash is what happens when it hits a floor if I remember correctly.

Nope

September 05, 2011, 06:56:42 PM
Reply #50

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 #50 on: September 05, 2011, 06:56:42 PM »
How would I make a weapon's attack proportional to the user's HP? As in, I want to make an attack become stronger (or weaker) with a DIRECT ratio to the attacker's health. This means for every 1 HP I lose, my attack will become 1 point stronger/weaker.

September 05, 2011, 07:27:32 PM
Reply #51

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 #51 on: September 05, 2011, 07:27:32 PM »
Check Murumasa from ye olde Classes.

September 05, 2011, 07:41:17 PM
Reply #52

Offline Max

  • MM8BDM Extender

  • i ate those food
  • ************
  • Date Registered: July 09, 2010, 08:10:13 PM

    • View Profile
    • ??
Re: The "How do I make a weapon do that?" thread
« Reply #52 on: September 05, 2011, 07:41:17 PM »
Quote from: "SmashBroPlusB"
How would I make a weapon's attack proportional to the user's HP? As in, I want to make an attack become stronger (or weaker) with a DIRECT ratio to the attacker's health. This means for every 1 HP I lose, my attack will become 1 point stronger/weaker.

Old Murumasa didn't do this. However, the general theme is there. The only way I can think of to make a direct change is to make 100 checks and 100 projectiles!!

September 05, 2011, 07:42:34 PM
Reply #53

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 #53 on: September 05, 2011, 07:42:34 PM »
SHIT.

So I can't call "health" like a variable? I have to literally make ONE HUNDRED CHECKS?

September 05, 2011, 07:46:08 PM
Reply #54

Offline Max

  • MM8BDM Extender

  • i ate those food
  • ************
  • Date Registered: July 09, 2010, 08:10:13 PM

    • View Profile
    • ??
Re: The "How do I make a weapon do that?" thread
« Reply #54 on: September 05, 2011, 07:46:08 PM »
XXXX A 0 A_JumpIfHealthLower(100,"Fire100")
XXXX A 0 A_JumpIfHealthLower(99,"Fire99")
XXXX A 0 A_JumpIfHealthLower(98,"Fire98")

etc etc

HAVE FUN!!!

EDIT : START AT 1, NOT 100! SILLY ME...

September 05, 2011, 07:54:14 PM
Reply #55

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 #55 on: September 05, 2011, 07:54:14 PM »
Grumble grumble...

Everyone else, don't consider my question "closed". If you find ANY better way to do this, for the love of all things Mega Man PLEASE PLEASE PLEEEEEEEEAAAAAAAASSSSSEEEEEEEEEE share it with me!

(I'm doing Hub Style last now.)

September 05, 2011, 08:30:56 PM
Reply #56

Offline TheBladeRoden

  • MM8BDM Extender
  • ***
  • Date Registered: October 14, 2010, 07:26:58 PM

    • View Profile
    • TheBladeRoden's Home Page
Re: The "How do I make a weapon do that?" thread
« Reply #56 on: September 05, 2011, 08:30:56 PM »

September 09, 2011, 08:03:58 PM
Reply #57

Offline BiscuitSlash

  • MM8BDM Extender
  • *
  • Date Registered: November 20, 2010, 12:49:25 PM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #57 on: September 09, 2011, 08:03:58 PM »
Okay, sadly my weapon may only be good with a special thing that makes them go through players. Is this possible? As in going through actors?

September 09, 2011, 08:48:40 PM
Reply #58

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 #58 on: September 09, 2011, 08:48:40 PM »
Keep in mind, it doesn't have to be 100% battle orientated. An air dash is useful enough on its own, any damage is just a helpful side effect.

September 09, 2011, 09:01:46 PM
Reply #59

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 #59 on: September 09, 2011, 09:01:46 PM »
Give them an item that sets -solid. Then give an item that sets +solid.