Ambrosia Garden Archive
    • Fire Burns


      Hi everybody,

      I'm making a "fire elemental" enemy and, naturally, it's on fire. So, I want the player to be damaged (with a small fire effect too, if that's possible) whenever they hit it. I really can't figure out a way to do this, can you? 😛

      Thanks.

    • Ledorax, on Nov 26 2005, 02:46 PM, said:

      Hi everybody,

      I'm making a "fire elemental" enemy and, naturally, it's on fire. So, I want the player to be damaged (with a small fire effect too, if that's possible) whenever they hit it. I really can't figure out a way to do this, can you? 😛

      Thanks.
      View Post

      Hello,

      Easy way:
      You could try adding a cast spell event to the player contact event screen on the NPC. The spell would be casted by the player upon himself with the damage effect and fire burn animation. You may want to add a conditional for if the hero has a ranged weapon, then the spell will not be casted.

      disadvantage: I believe that the player will play the casting animation every time he is hit by the spell (you could turn this into a sort of harmed animation is the player has no spells).

      Advantage: you can make your own special player animation of being harmed by the fire damage if you choose

      Slightly harder way:
      create two global variables: let's call them gb_pixel_x, and gb_pixel_y
      You will need to find the ratio of pixels to movement tiles in your game. Let's say that the ratio is 30.
      create this event string within the Fire NPC's player contact event screen:
      1. set global gb_pixel_x to player_x
      2. set global gb_pixel_y to player_y
      3. set global gb_pixel_x to multiply by 30
      4. set global gb_pixel_y to multiply by 30
      5. create stamp "(insert fire damage animation)" at "(gb_pixel_x,gb_pixel_y)"
      6. set attribute health to subtract (whatever fire damage you want)
      7. Play sound "(either player hurt, fire damage or both)

      your done!

      disadvantage: it will take you longer to make than the previous one.

      Advantage: you don't need to worry about the player cast animation if you already have one in place.

      Finding the movement tile to pixel ratio (don't worry it's not that hard :))
      1. open any one of your maps
      2. select change map dimensions
      3. whatever number it has in both the movement tile x and y in pixels is the ratio you are looking for.
      4. there is no step 4!

      This post has been edited by GrahamVH : 26 November 2005 - 11:31 AM

    • That doesn't seem to work. I beat the NPC to death but nothing happens, I don't even get damaged. 😞

      Edit: I used the "difficult" way.

      This post has been edited by Ledorax : 26 November 2005 - 12:04 PM

    • I'll assume that you're placing the fire NPC onto the map via NPC control in the map location. That way, you can know that the Player is to combat the Fire NPC. Associate the placing of the Fire NPC with a fireglobal.

      Make a fireweapon unique for this conflict. Via conditional and fireglobal, when the Fire NPC is loaded, the Player's weapon is automatically equipped (make sure there's no sound associated with the equipping or using; otherwise you'll hear it when the map loads). Under "hit" change the stamina attribute by subtracting a number. Also place a sound that indicates that the Player's been hit.

      I'd try endowing the fireweapon with a spell and a fire animation that then hits you as well as him. Is that possible? I don't know. Haven't really gotten into spells yet.

      Make sure that you reset the fireGlobal and the Player's weapon when you exit the map.

      At least this is what I'd try. Unfortunately, I don't have Coldstone on this machine. Hope this helps anyway.

    • So you're sure that what graham suggested didnt work? I thought it would.....

      But I guess if you just subtract a certain amount of damage from the player in the player contact it would simulate the effect of running into him and catching on fire. That would take care of that. And if you wanted, just make a fire animation appear on the player X and Y. Although it wouldnt follow the character... If you made an animation of the player on fire, then you could switch the player animation to that, and after a certain period of time switch it back. That way you would have the player look like its on fire and get hurt while he is.

      Edit: Grammer

      This post has been edited by Pixor : 26 November 2005 - 05:20 PM

    • Debra: Changing the player's weapon would mean that they do more/less damage than usual and will be rather confused when they bring up the inventory screen and find a "fire weapon" instead of their ordinary one. Besides, they would have to reequip their ordinary weapon once they've left the map with the flaming people.

      Pixor: Player contact won't work for a hostile NPC it seems. And while I do agree that having the player be "on fire" would be really nice, it would be too much work for such a small effect.

      Any other ideas? <_<

      Edit: confusing sentence

      This post has been edited by Ledorax : 26 November 2005 - 06:30 PM

    • No, you can have the same damage. You can unequip automatically and reequip the last weapon when the Player goes to another map, or, if the enemy is only one unique enemy, when the enemy dies.

      Or make the weapon a true fire weapon that the Player knows about and equips/unequips himself when he faces the fire enemy.

      Think of the weapon like a bow that shoots arrows. The bow would be your firesword. The arrows would be an animation.

    • Debra, on Nov 27 2005, 12:58 PM, said:

      No, you can have the same damage. You can unequip automatically and reequip the last weapon when the Player goes to another map, or, if the enemy is only one unique enemy, when the enemy dies.
      View Post

      How would it know how much damage my current weapon does? Besides, the player could still unequip it and take no damage from the foe.

    • I use globals when I need to know what weapon, etc. the Player equips. I add 1 under equip and set to 0 under unequip. This works very well for me. But you can automatically equip when entering a map.

      I'm just suggesting a guide, of course. Whether or not you try it as a possibility is up to you. I hope it helps and wish you the very best.

    • Ledorax, on Nov 26 2005, 06:26 PM, said:

      Pixor: Player contact won't work for a hostile NPC it seems. And while I do agree that having the player be "on fire" would be really nice, it would be too much work for such a small effect.
      View Post

      yeah your right, I tried it and got nothing, thats real strange... sigh yet another of coldstone's bugs. But its still an amazing program. Hopefully that'll be one of the things Ambrosia will fix in the update.

      Oh, duh, im an idiot! Just give the Fire Elemental a sword that has an event link to it! So on the hit link on this sword, just change the character animation to that of a dood on fire! Then after the animation with the character on fire, have the last frame link to an event which turns the animation back to the old one. Or if its too much work to draw your hero seperately on fire, have the sword link to a spell instead that deals fire damage every round and repeats the animation every round (may have to play around with that). And have the spell's animation be fire so that it looks like the player is on fire! That would work perfectly i think!

      Edit: Turning animation back to the Hero

      This post has been edited by Pixor : 28 November 2005 - 03:28 PM

    • Pixor, on Nov 28 2005, 08:23 PM, said:

      Oh, duh, im an idiot! Just give the Fire Elemental a sword that has an event link to it!
      View Post

      That's not what I wanted to do, but it's a good idea. I think I'll try that instead as the other seems impossible (I'm still not quite sure what Debra means <_< ).

      Thanks.

    • Try this.

      Step 1: Create a single-target spell of the "instantly hits" type. Make the graphic the one you want on the player when he gets burned. 0 mana cost.

      Step 2: Create a white stamp that loops. Give it enough frames that it lasts about one second (or the interval of damage you want).

      Step 3: Make a hostile npc with pretty much infinite health, and make his graphic just a white dot. Give him the spell you made from step 1.

      Step 4: Make a new global called CanBurn. In your fire elemental's attack animation, make a new event that sets CanBurn to 1.

      Step 5: Make a new event called Immolation. In this event, check to make sure CanBurn is equal to 1. If it is, create the white-dot NPC at (Player X, Player Y).

      Step 6: In the cast event of the spell you made, delete the white-dot NPC and set CanBurn equal to 0.

      Step 7: In the white stamp, place the Immolation event at the last frame.

      This way you can use a hidden caster to do real damage that takes resistances into account while creating the effect. CanBurn is used to make sure the hero is next to the fire elemental (assuming it has a melee attack ._.). I hope no green health bar will appear for the hidden caster. If it does, make its sprite a white line that travels down (outside of the player's field of view).

      Hopefully Coldstone's limitations won't screw something up =/

    • The fire elemental only has fire spells, no melee attacks. Doesn't matter though, I already decided to go with pixor's idea (with a spell instead of a sword). I think I'll use your little tutorial to damage the player if he steps in the lava 😄 .