header general

Weapon Improvement

  • cmw1986
  • cmw1986's Avatar Topic Author
  • Wraith
  • Wraith
More
7 years 5 months ago - 7 years 5 months ago #1 by cmw1986
Weapon Improvement was created by cmw1986
Hey MagicWazard,

I have a weapon that needs fixing to behave how I want for it to do.

My weapon is fireworks that are supposed to stop an enemy in its tracks when the enemy comes across one after the player places one on the ground (the enemy also enters and stays in pain state without taking any pain/damage which is what I already have so far). Then the firework is supposed to activate itself and launch straight up into the sky and take the enemy along with it! (which eventually blows up and kills the enemy). Sound pretty cool, eh?!.

How do I go by accomplishing this task?. What actually really needs to be fixed with the weapon's codes is probably just the FireworksLighting actor, but I could be wrong. Here are the current codes for the fireworks and an enemy (replaces rifle zombies) to help you with this neat idea:

Warning: Spoiler!
Last edit: 7 years 5 months ago by Blue Shadow. Reason: Spoilered the code.

Please Log in or Create an account to join the conversation.

  • MagicWazard
  • MagicWazard's Avatar
  • Moderator
  • Moderator
More
7 years 5 months ago #2 by MagicWazard
Replied by MagicWazard on topic Weapon Improvement
Ooooh...that's tricky. Offhand, I don't really have a good solution for this. It's kind of an odd function, as simple as it may seem. I'll let you know if I come up with any suggestions. Maybe Blue Shadow will have an idea; he's very good at coding complex behaviors. Don't be afraid to ask on the ZDoom forums, too; there's a lot more traffic there, so a larger number of technically-inclined folks may see your question.

Also, for real long posts like this, you may want to spoiler out the contents, so as to prevent the need to perform lots of scrolling. :)

Please Log in or Create an account to join the conversation.

  • cmw1986
  • cmw1986's Avatar Topic Author
  • Wraith
  • Wraith
More
7 years 5 months ago - 7 years 5 months ago #3 by cmw1986
Replied by cmw1986 on topic Weapon Improvement
Okay then, I'll ask him here since he's also a moderator on this forum.

@Blue Shadow: do you know what to do about my request/problem here?...

Peace!
-cmw1986
Last edit: 7 years 5 months ago by cmw1986.

Please Log in or Create an account to join the conversation.

  • MagicWazard
  • MagicWazard's Avatar
  • Moderator
  • Moderator
More
7 years 5 months ago - 7 years 5 months ago #4 by MagicWazard
Replied by MagicWazard on topic Weapon Improvement
In the meanwhile, I came up with an idea:
*Right before the firework projectile "dies" and spawns its pyrotechnic effects, set its damage type to a new type (e.g. "FireworkDeath") using A_SetDamageType. Ensure it deals at least 1 point of damage using this new type.
*Give your monster a pain chance of 256 for the new damage type "FireworkDeath". Also give it a new pain state; Pain.FireworkDeath.
*In the monster's Pain.FireworkDeath state, set the monster's mass to 0 using A_SetMass; give the monster the NOGRAVITY flag using A_ChangeFlag; then, use ThrustThingZ to launch it into the air. Once it reaches an appropriate height (matching the firework pyrotechnics' height), you can then have the monster kill itself somehow.
Last edit: 7 years 5 months ago by MagicWazard.

Please Log in or Create an account to join the conversation.

  • cmw1986
  • cmw1986's Avatar Topic Author
  • Wraith
  • Wraith
More
7 years 5 months ago #5 by cmw1986
Replied by cmw1986 on topic Weapon Improvement
Sure I'll try that, but to make it easier can you show me an updated example of the character's and weapon's DECORATE codes?.

Please Log in or Create an account to join the conversation.

  • cmw1986
  • cmw1986's Avatar Topic Author
  • Wraith
  • Wraith
More
7 years 5 months ago #6 by cmw1986
Replied by cmw1986 on topic Weapon Improvement
Hmm... Since Magic Wazard hasn't responded yet, maybe Blue Shadow has a better solution perhaps?...

@Blue Shadow: with your skill at coding, I'm hoping you can help me solve my problem with my situation here. Do you have any ideas how to fix this issue I'm having?.

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
7 years 5 months ago #7 by Blue Shadow
Replied by Blue Shadow on topic Weapon Improvement
Sorry, I don't have an answer. I'm not currently in the mood to figure out or solve editing problems. :(

Please Log in or Create an account to join the conversation.

  • MagicWazard
  • MagicWazard's Avatar
  • Moderator
  • Moderator
More
7 years 5 months ago #8 by MagicWazard
Replied by MagicWazard on topic Weapon Improvement
Sorry, I meant to ask if you could post a "functioning" version of the firework and monster, with whatever sprites they need--even if they don't work "right" just yet. It'll be a little easier to experiment with it if all the sprites are provided.

Please Log in or Create an account to join the conversation.

  • cmw1986
  • cmw1986's Avatar Topic Author
  • Wraith
  • Wraith
More
7 years 4 months ago - 7 years 4 months ago #9 by cmw1986
Replied by cmw1986 on topic Weapon Improvement

MagicWazard wrote: In the meanwhile, I came up with an idea:
*Right before the firework projectile "dies" and spawns its pyrotechnic effects, set its damage type to a new type (e.g. "FireworkDeath") using A_SetDamageType. Ensure it deals at least 1 point of damage using this new type.
*Give your monster a pain chance of 256 for the new damage type "FireworkDeath". Also give it a new pain state; Pain.FireworkDeath.
*In the monster's Pain.FireworkDeath state, set the monster's mass to 0 using A_SetMass; give the monster the NOGRAVITY flag using A_ChangeFlag; then, use ThrustThingZ to launch it into the air. Once it reaches an appropriate height (matching the firework pyrotechnics' height), you can then have the monster kill itself somehow.


With this being said, can you show me an updated example of the DECORATE codes in my first post?. After that, I'll test it out and let you know the results sometime later on... :|

-cmw1986
Last edit: 7 years 4 months ago by cmw1986.

Please Log in or Create an account to join the conversation.

  • MagicWazard
  • MagicWazard's Avatar
  • Moderator
  • Moderator
More
7 years 4 months ago - 7 years 4 months ago #10 by MagicWazard
Replied by MagicWazard on topic Weapon Improvement

cmw1986 wrote: With this being said, can you show me an updated example of the DECORATE codes in my first post?. After that, I'll test it out and let you know the results sometime later on... :|

-cmw1986


Maybe I wasn't clear--when I said a "working" version, I didn't mean one that "worked correctly"; just something that ran that I could play with to see what happened. Barring that, may you at least post the sprites you're using for the fireworks? That would make it much easier to try ideas out, especially if the rest of the DECORATE hasn't changed yet.
Last edit: 7 years 4 months ago by MagicWazard.

Please Log in or Create an account to join the conversation.