Advanced Search

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

0 Members and 2 Guests are viewing this topic.

April 10, 2013, 07:56:00 PM
Reply #360

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 #360 on: April 10, 2013, 07:56:00 PM »
Quote from: "SmashBroPlusB"
How do you make an item trigger from a weapon's FIRE state, like Beat Support?
Have an A_JumpIfInventory check if the item is in inventory to jump to an "UseItem" or something, where it will do the actions and then jump back to fire, but with a jump straight to the point after A_JumpIfInventory

April 10, 2013, 09:54:43 PM
Reply #361

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 #361 on: April 10, 2013, 09:54:43 PM »
That doesn't necessarily work 100% of the time...he asked from "A weapon" not a a custom weapon...your suggestion would work for a custom weapon, while mine would be a more omniscient suggestion and can work with all weapons regardless of whether they are custom.

April 11, 2013, 05:56:15 AM
Reply #362

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 #362 on: April 11, 2013, 05:56:15 AM »
Exactly what Lego said. I was trying to make a custom inventory item that could (theoretically) work with anything ever, and its effects are triggered based on whether a player attacks or not.

Anyway, thanks for the help!

April 11, 2013, 07:26:01 AM
Reply #363

Offline JaxOf7

  • MM8BDM Extender
  • *****
  • Date Registered: March 23, 2011, 03:56:13 AM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #363 on: April 11, 2013, 07:26:01 AM »
Lego, that is an interesting decorate solution to getting the teleport bullet to know who fired it.
But here is the acs solution:

ACS
Code: [Select]
script 147 (void)
{
SetActivatorToTarget(0);
SetResultValue(ActivatorTID());
}

Decorate
Code: [Select]
actor TeleportShot : MegaShot replaces MegaShot
{
States
{
Death:
TNT1 A 0 Thing_ChangeTID(0, 1101)
TNT1 A 0 Thing_Move(ACS_ExecuteWithResult(147), 1101, 0)
stop
}
}

April 15, 2013, 02:39:21 PM
Reply #364

Offline Stardust

  • Enthusiast
  • *
  • Date Registered: July 15, 2012, 07:42:47 AM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #364 on: April 15, 2013, 02:39:21 PM »
So, I would like to create an invisible hitbox and be able to control the area where it spawns with X/Y/Z offsets.
To put it simply, take a look at the Mega Ball. When you fire, Mega Ball is materialized some small steps forward, and not directly from "your body". The gameplay idea would be like the GunDelSol card from the MMBNetwork series : you know, the flashing light spawns and damage not in front, but on the second column.
Also, unlike Mega Ball which use A_SpawnItemEx, disabling aiming and spawning at a fixed point, I'd be able to aim my hitbox like with A_FireCustomMissile. Is it possible ?
Also, my hitbox won't deal explosive damages, but simply hurt one time if an opponent touches the hitbox.

...eeer, puh-lease tell me if I was confusing somewhere.

April 15, 2013, 03:08:10 PM
Reply #365

Offline Zard1084

  • Donator

  • The world is pain...
  • *
  • Date Registered: August 24, 2012, 11:25:00 PM

    • View Profile
    • http://www.youtube.com/user/Zard1084
Re: The "How do I make a weapon do that?" thread
« Reply #365 on: April 15, 2013, 03:08:10 PM »
Quote from: "Stardust"
So, I would like to create an invisible hitbox and be able to control the area where it spawns with X/Y/Z offsets.
To put it simply, take a look at the Mega Ball. When you fire, Mega Ball is materialized some small steps forward, and not directly from "your body". The gameplay idea would be like the GunDelSol card from the MMBNetwork series : you know, the flashing light spawns and damage not in front, but on the second column.
Also, unlike Mega Ball which use A_SpawnItemEx, disabling aiming and spawning at a fixed point, I'd be able to aim my hitbox like with A_FireCustomMissile. Is it possible ?
Also, my hitbox won't deal explosive damages, but simply hurt one time if an opponent touches the hitbox.

...eeer, puh-lease tell me if I was confusing somewhere.
That shouldn't be too hard to do Just use A_FireCustomMissile and just make the projectile be invisible and spawn and disappear quickly and then have the projectile spawn what you want. i might be wrong but i hope i helped you...

April 15, 2013, 03:18:20 PM
Reply #366

Offline Stardust

  • Enthusiast
  • *
  • Date Registered: July 15, 2012, 07:42:47 AM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #366 on: April 15, 2013, 03:18:20 PM »
Quote from: "Zard1084"
That shouldn't be too hard to do Just use A_FireCustomMissile and just make the projectile be invisible and spawn and disappear quickly and then have the projectile spawn what you want. i might be wrong but i hope i helped you...

Oh I see, that's clever, I missed that hint. So, in order, it should...
1) Use FireCustomMissile for aiming working purpose only
2) FireCustomMissile spawns some kind of invisible reference
3) That reference quickly disappear, but before, it'll use SpawnItemEx, which has all the X/Y/Z parameters needed to spawn the hitbox.

And also, if this hitbox spawns INSIDE some robot's body, will it OHKO this later one ? I'm pretty sure that I saw somewhere, that the Mega Ball could OHKO a player if the ball spawns inside...

April 15, 2013, 03:26:52 PM
Reply #367

Offline Zard1084

  • Donator

  • The world is pain...
  • *
  • Date Registered: August 24, 2012, 11:25:00 PM

    • View Profile
    • http://www.youtube.com/user/Zard1084
Re: The "How do I make a weapon do that?" thread
« Reply #367 on: April 15, 2013, 03:26:52 PM »
Quote from: "Stardust"
Quote from: "Zard1084"
That shouldn't be too hard to do Just use A_FireCustomMissile and just make the projectile be invisible and spawn and disappear quickly and then have the projectile spawn what you want. i might be wrong but i hope i helped you...

Oh I see, that's clever, I missed that hint. So, in order, it should...
1) Use FireCustomMissile for aiming working purpose only
2) FireCustomMissile spawns some kind of invisible reference
3) That reference quickly disappear, but before, it'll use SpawnItemEx, which has all the X/Y/Z parameters needed to spawn the hitbox.

And also, if this hitbox spawns INSIDE some robot's body, will it OHKO this later one ? I'm pretty sure that I saw somewhere, that the Mega Ball could OHKO a player if the ball spawns inside...
Well the thing is the megaball ohkos because the megaball bounces and thus the victim takes alot of damage in a short time and
1. yes
2.yes
and 3. YES!
I'm glad you understood quickly.
Edit: i'm fairly new to making weapons myself so i may have forgot something.... but you can check out what i made here

April 15, 2013, 04:09:37 PM
Reply #368

Offline Stardust

  • Enthusiast
  • *
  • Date Registered: July 15, 2012, 07:42:47 AM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #368 on: April 15, 2013, 04:09:37 PM »
Quote from: "Zard1084"
Well the thing is the megaball ohkos because the megaball bounces and thus the victim takes alot of damage in a short time and
1. yes
2.yes
and 3. YES!
I'm glad you understood quickly.
Edit: i'm fairly new to making weapons myself so i may have forgot something.... but you can check out what i made here

Ah, yeah, bouncing in a solid works like some kind of infinite very fast bouncing... indeed, indeed. Anyway making the Mega Ball penetrate a solid actor (= player) shouldn't be usual and easy to do, in that case.
I'll take a look at your weapons once I'll finish mine if you want me to =w=

EDIT : Weirdly enough, it doesn't work. The reference spawn the actual projectile, but not at the desired aim...

April 15, 2013, 07:40:43 PM
Reply #369

Offline Zard1084

  • Donator

  • The world is pain...
  • *
  • Date Registered: August 24, 2012, 11:25:00 PM

    • View Profile
    • http://www.youtube.com/user/Zard1084
Re: The "How do I make a weapon do that?" thread
« Reply #369 on: April 15, 2013, 07:40:43 PM »
Quote from: "Stardust"
Quote from: "Zard1084"
Well the thing is the megaball ohkos because the megaball bounces and thus the victim takes alot of damage in a short time and
1. yes
2.yes
and 3. YES!
I'm glad you understood quickly.
Edit: i'm fairly new to making weapons myself so i may have forgot something.... but you can check out what i made here

Ah, yeah, bouncing in a solid works like some kind of infinite very fast bouncing... indeed, indeed. Anyway making the Mega Ball penetrate a solid actor (= player) shouldn't be usual and easy to do, in that case.
I'll take a look at your weapons once I'll finish mine if you want me to =w=

EDIT : Weirdly enough, it doesn't work. The reference spawn the actual projectile, but not at the desired aim...
I Knew i forgot Something! hold on let me check some stuff...
Edit: try using the wiki here i hope this helps...

May 01, 2013, 05:01:12 PM
Reply #370

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 #370 on: May 01, 2013, 05:01:12 PM »
Okay...
I actually have quite a few things I need to ask you guys.

How would I code a weapon that grapples on to things like walls and other players, and brings the user towards them? but has about the range of duo fist? Basically, how do I make a weapon that acts like duo fist, but the user can grapple on to things with it.

Also, what about a melee weapon that grabs the person and turns them around to the user, then is insta killed afterward?

Also, how about this classes thing, like if one class picks up another classes weapon, but gets another weapon of their own instead?

And how do I add sounds to weapons? I've tried nearly every thing and it just doesn't work.

May 12, 2013, 04:26:12 PM
Reply #371

Offline CStar7

  • Standard Member
  • Date Registered: March 25, 2013, 01:43:33 AM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #371 on: May 12, 2013, 04:26:12 PM »
Hi, guys.

I made a weapon that fires shots on FIRE, and reloads the ammo bar on FIRE-HOLD. I made a bot to use this weapon, but when he attacks, he only shoots 1 shot. Of course, bots always try to charge their weapon, or continually fire it. My question is "How do I stop the bot from holding fire?".

May 12, 2013, 05:43:08 PM
Reply #372

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 #372 on: May 12, 2013, 05:43:08 PM »
Check Atomic Fire. It has scripts that make bots fire in certain states.

May 12, 2013, 06:24:39 PM
Reply #373

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 #373 on: May 12, 2013, 06:24:39 PM »
Quote from: "Korby"
Check Atomic Fire. It has scripts that make bots fire in certain states.
Otherwise, it can be handled with jumps checking for MonsterBlock, right?

May 12, 2013, 07:29:09 PM
Reply #374

Offline CStar7

  • Standard Member
  • Date Registered: March 25, 2013, 01:43:33 AM

    • View Profile
Re: The "How do I make a weapon do that?" thread
« Reply #374 on: May 12, 2013, 07:29:09 PM »
Quote from: "Korby"
Check Atomic Fire. It has scripts that make bots fire in certain states.

Do you know where the scripts for that are?