Ambrosia Garden Archive
    • Impact


      boom!

      Ok, I am making an "exploding potion" for the plugin I'm making for RD's little "contest". I started it today, hehe.

      Well, I was just wondering if anyone knows of a good way to make it explode on impact? Like, you use it, click on an enemy, flask flies towards him and BOOM! Explodes.

      If it's not possible, I can always just have the bottle hitting him, but it would be a nice effect 🙂 .

      Thanks.

    • Ledorax, on Jun 12 2005, 05:30 PM, said:

      . . a good way to make it explode on impact? Like, you use it, click on an enemy, flask flies towards him and BOOM! Explodes.
      View Post

      Here's how I see it. Create a new weapon (bottle slingshot, or whatever.) Weapon has a spell. When used, an animation of thrown (spinning is nice) bottle goes from caster to target. On the spell's editor, event links tab, choose "hit target" and place another animation of exploding bottle. Want it really effective? Include "play sound" of breaking glass. 🙂

    • I'm not quite sure I get it, how would I place an animation there? Stamp control?

    • Set stamp co-ordinates to "actualX, actualY."

    • Those aren't pixel coordinates, are they?

    • You're right. A stamp has to be placed at pixel co-ordinates and &&ActualX, &&ActualY will be the NPC's tile co-ordinates. You can get around this by having gb_BOOMX set at &&ActualX multiplied by 32 and the same for gb_BOOMY. It may take a little tweeking but this is better than trying to drop an item which is animated. (I don't think that even works.) Since gb_BOOM (X, Y) would be set in the "hit target" event, you only need the one pair of globals to work wherever the target is. As it may take more than one shot to kill the NPC, this should work each time the bottle is thrown. Event would read as follows:
      Change gb_BOOMX = &&ActualX
      Change gb_BOOMY = &&ActualY
      Change gb_BOOMX = times 32
      Change gb_BOOMY = times 32
      Stamp Control -> place animBOOM at &&BOOMX, &&BOOMY

    • I take it that you can't do this under "hit" with weapon, but only with a spell?

    • It may work with the "hit" link on the weapon. I haven't tried that. For some reason I thought it would work better if the weapon had a spell. Now that you press me to defend that, I don't have an answer with which I feel confident. :unsure:

    • The bottle is actually a usable item. When you use it, the inventory screen closes and you can click on an enemy (you cast a spell). Then, your character throws a bottle at the target and BOOM!

      I'll have to experiment with the stamp placement for a while. Time to make a target dummy 😄 .

      Thanks.

    • Decided to make it target all enemies instead of just one, since the character starts running towards the target when he throws the bottle 😞 . Made the bottle missile for nothing. If anyone needs an animation of a spinning bottle, tell me 😛 .

    • I can't quite figure out what "hit" in a weapon really does. I've tried to add a stamp control in a weapon under "hit" and it doesn't seem to work. Yet. I'm assuming I'm doing something wrong.

    • Didn't work for me either, I suppose there's something wrong with the "actual" co-ordinates. And I also think that hit is the same thing as miss because of a bug.

    • Debra, on Jun 13 2005, 08:33 AM, said:

      I can't quite figure out what "hit" in a weapon really does. I've tried to add a stamp control in a weapon under "hit" and it doesn't seem to work. Yet. I'm assuming I'm doing something wrong.
      View Post

      I think you just reminded me why I suggested using a spell. I dimly recall trying to make it work long ago. As Ledorax says, there's a bug in there somewhere. 🙂

    • Ledorax, on Jun 13 2005, 06:49 AM, said:

      Decided to make it target all enemies instead of just one, since the character starts running towards the target when he throws the bottle 😞 . Made the bottle missile for nothing. If anyone needs an animation of a spinning bottle, tell me 😛 .
      View Post

      Just a thought - - Would it work if the event read:

      Change global -> gb_speed1 = &&speed
      Atribute Wizard -> set speed = zero
      throw bottle sequence
      Atribute Wizard -> set speed = && speed 1

    • At a speed of 0 you can still move, I believe you move 1 pixel per 2 frames.

      I tried freezing and defreezing the player, but it still wouldn't work.

    • I want to see your spinning bottle crash into the monster. :mad: There has got to be a way to make this work. If you used the idea of a "Bottle Launcher" ranged weapon, you buy the exploding bottles, they go in inventory, now equip the weapon. If weapon detects bottles in inventory, bottles can be thrown with weapon allowing player to hold his position. One bottle is deducted from inventory each time the weapon is fired. To allow Swordsmen and Conjurers to use this weapon, you cannot label it as a ranged weapon. That's where the "weapon has a spell" comes in.

      The problem of the player rushing into the face of the monster when the monster is targeted is not new. You can stop the foward rush by holding down the Z key (defend) while you shoot, but that's a lame work-around in my opinion.

    • Ah, but then he would still cast a spell, so he would still run to the monster, and the spell part has charges, so he would only be able to do it so many times before he can't use it anymore.

    • Ledorax, on Jun 13 2005, 12:01 PM, said:

      Ah, but then he would still cast a spell, so he would still run to the monster, and the spell part has charges, so he would only be able to do it so many times before he can't use it anymore.
      View Post

      I don't think so. The weapon has a spell, not the player. And the way you had it before didn't the supply of bottles run out when you used them from inventory? If you want him to be able to use indefinitely, don't drop one from inventory when the weapon is used.