• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Import] HELP!

Status
Not open for further replies.
Level 6
Joined
Aug 31, 2018
Messages
157
Hello everyone! How can i make to choose +1 attribute stat (str/agi/int) for every level-up? Like everytime you level-up you gain skill points which can be used to up stats.

Also how to make a spell (for example: Death coil) to deal dmg and also heal you? I've made a trigger but instead of dealing damage and heals me, i take the damage.. (look at the picture)

Also i want to make an item to add 1 spell and remove other spell at same time (when you buy it from shop) For example: Buying robe of mage from the shop and it remove one abillity and add other.

P.S Thank's for every answer which gonna be given!
 

Attachments

  • Help10.png
    Help10.png
    39.4 KB · Views: 52
Last edited:
Level 16
Joined
Mar 27, 2011
Messages
1,349
Hello everyone! How can i make to choose +1 attribute stat (str/agi/int) for every level-up?

You can do this in the object editor. See attached.

Also how to make a spell (for example: Death coil) to deal dmg and also heal you? I've made a trigger but instead of dealing damage and heals me, i take the damage.. (look at the picture)

Can you ellaborate? I presume it heals allies and damages enemies? It doesn't make much sense to heal and damage at the same time does it?
 

Attachments

  • Screeny.png
    Screeny.png
    92 KB · Views: 50
Level 6
Joined
Aug 31, 2018
Messages
157
You can do this in the object editor. See attached.



Can you ellaborate? I presume it heals allies and damages enemies? It doesn't make much sense to heal and damage at the same time does it?
Ah.. Listen. About the picture.. Have you ever played PvE map (dungeons) there u can choose to up +1 between str/agi/int for every leveled-up. For example you level-up and you get 5 skill points which u can use to up your str+1 for each point.

And about the spell.. Its self heal. For example: Death coil. Dealing 400 dmg and heal yourself for 200 (but ill make it with attribute scale) like in the picture.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Ah.. Listen. About the picture.. Have you ever played PvE map (dungeons) there u can choose to up +1 between str/agi/int for every leveled-up. For example you level-up and you get 5 skill points which u can use to up your str+1 for each point.

I haven't played that game. How exactly will this system work? Did you want players to pres dialogue boxes for stats. Did you want players to "buy" their stats from a shop? Did you want players to type their stats? Will players have more than 1 hero?

And about the spell.. Its self heal. For example: Death coil. Dealing 400 dmg and heal yourself for 200 (but ill make it with attribute scale) like in the picture.

So if cast on an enemy, it damages for 400, and if cast on the owner, it heals fro half as much?

  • Death Coil
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Set DamageAmount = 400.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) belongs to an ally of (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • -------- Heal the Ally --------
          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (DamageAmount / 2.00))
        • Else - Actions
          • -------- Damage the enemy --------
          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - DamageAmount)
If I've still got your intention wrong, you need to think about every details of what you want your spell to do and explain that to us so we understand. Take your time explaining so it is clear and complete.
 
Last edited:
Level 6
Joined
Aug 31, 2018
Messages
157
So if cast on an enemy, it damages for 400, and if cast on the owner, it heals fro half as much?

  • Death Coil
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Set DamageAmount = 400.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) belongs to an ally of (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • -------- Heal the Ally --------
          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (DamageAmount / 2.00))
        • Else - Actions
          • -------- Damage the enemy --------
          • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - DamageAmount)
If I've still got your intention wrong, you need to think about every details of what you want your spell to do and explain that to us so we understand.
That wasn't what i've wanted but that actually gived me a briliant idea haha. Thank's for that trigger, ill use it! But the thing i wanted is to (for example) Death coil deals 5x STR of your hero as damage and at the same time heals you for 10x of your INT.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
This trigger will calculate the difference between the damage the strength causes and the healing the intelligence causes and apply it to the unit.

  • Death Coil 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Breath of Fire
    • Actions
      • Set IntelligenceAmount = (10.00 x (Real((Intelligence of (Triggering unit) (Include bonuses)))))
      • Set StrengthAmount = (5.00 x (Real((Strength of (Triggering unit) (Include bonuses)))))
      • Set DamageAmount = (IntelligenceAmount - StrengthAmount)
      • Game - Display to (All players) for 5.00 seconds the text: (Intelligence Amount = + (String(IntelligenceAmount)))
      • Game - Display to (All players) for 5.00 seconds the text: (Strength Amount = + (String(StrengthAmount)))
      • Game - Display to (All players) for 5.00 seconds the text: (Damage Amount = + (String(DamageAmount)))
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + DamageAmount)
 
Level 39
Joined
Feb 27, 2007
Messages
5,033
@Radicool he means the spell deals Y damage to the target and simultaneously heals the caster by Y, not something more complicated than that. Setting the health of the unit to deal damage isn't a good idea because that doesn't grant any kill credit (and thus anything associated with it, like gold). Instead you should use the Unit - Cause <caster> to damage <target>... action.

@HolyWillRise The next time you need help, please give your thread a better title than "HELP!", which you've done twice now. Also tagging them as Import is nonsensical; none of your questions have been about imports (putting into your website a model/sound/spell/system/etc. you found on this or another website). I see you're from Bulgaria so perhaps you are confusing it with the word "important"?

Second, since you've posted twice about making spells that use units' str/agi/int for damage effects: there is no way to make spells use hero stats without recreating the spell from the ground up using triggers. The object editor will NOT allow you to use hero stats in any of its fields. This significantly increases the complexity of any spells you may want to make that have any sort of a time delay before/during/after their effects (for example Death Coil doesn't actually do damage until the projectile hits the target) by necessitating the use of a projectile system, damage detect system, and likely a liberal use of hashtables. I'm not saying this is impossible or that you shouldn't do it; I'm letting you know that it will require a LOT more trigger-writing than you probably think it will. It's really easy to say "20xINT damage" but it's much harder to actually do.

Some spells are easy, but most will be difficult and as an example let me use Holy Light since it's the foil to Death Coil. Holy light is instant, which means that to cause it to damage undead for 10xint or heal an ally for 20xint you need this trigger:

  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to HOLY
  • Actions
    • Set TARGET = (Target unit of ability being cast)
    • If (All conditions are true) then do (Then actions) else do (Else actions)
      • If - Conditions
        • (TARGET belongs to an ally of (Owner of Triggering Unit) equal to true
        • (Target is Undead) equal to false
      • Then - Actions
        • Unit - Set TARGET life to (Current life of TARGET + (20.00 x (Triggering Unit current Intelligence (include bonuses))))
      • Else - Actions
    • If (All conditions are true) then do (Then actions) else do (Else actions)
      • If - Conditions
        • (TARGET belongs to an enemy of (Owner of Triggering Unit) equal to true
        • (Target is Undead) equal to true
      • Then - Actions
        • Unit - Cause (Triggering Unit) to damage TARGET for (10.00 x (Triggering Unit current Intelligence (include bonuses))) points of attack type Spells and damage type Normal
      • Else - Actions
Death Coil would be the same except you also create the projectile yourself, have to attach data to it about what it's targeting and who cast it, launch it... then wait to detect its impact with the target unit in a separate trigger and from there deal damage or heal.

You can fudge this a little bit by calculating the distance between the target and the caster then dividing by the speed of the missile (an Object Editor field, so your trigger can't 'know'/'learn' the speed, it has to be told) to get the time until impact. Then use the Wait command for that amount of time. This will not be in sync perfectly most of the time, and it can even break spectacularly if the target unit is moving or if the delay is shorter than the shortest possible Wait.

Again I'm not telling you you shouldn't or can't, just that it will be hard if you are not experienced writing triggers or other code. Food for thought before you embark upon this map journey to use hero stats in every spell.
 
Level 6
Joined
Aug 31, 2018
Messages
157
@Radicool he means the spell deals Y damage to the target and simultaneously heals the caster by Y, not something more complicated than that. Setting the health of the unit to deal damage isn't a good idea because that doesn't grant any kill credit (and thus anything associated with it, like gold). Instead you should use the Unit - Cause <caster> to damage <target>... action.

@HolyWillRise The next time you need help, please give your thread a better title than "HELP!", which you've done twice now. Also tagging them as Import is nonsensical; none of your questions have been about imports (putting into your website a model/sound/spell/system/etc. you found on this or another website). I see you're from Bulgaria so perhaps you are confusing it with the word "important"?

Second, since you've posted twice about making spells that use units' str/agi/int for damage effects: there is no way to make spells use hero stats without recreating the spell from the ground up using triggers. The object editor will NOT allow you to use hero stats in any of its fields. This significantly increases the complexity of any spells you may want to make that have any sort of a time delay before/during/after their effects (for example Death Coil doesn't actually do damage until the projectile hits the target) by necessitating the use of a projectile system, damage detect system, and likely a liberal use of hashtables. I'm not saying this is impossible or that you shouldn't do it; I'm letting you know that it will require a LOT more trigger-writing than you probably think it will. It's really easy to say "20xINT damage" but it's much harder to actually do.

Some spells are easy, but most will be difficult and as an example let me use Holy Light since it's the foil to Death Coil. Holy light is instant, which means that to cause it to damage undead for 10xint or heal an ally for 20xint you need this trigger:

  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to HOLY
  • Actions
    • Set TARGET = (Target unit of ability being cast)
    • If (All conditions are true) then do (Then actions) else do (Else actions)
      • If - Conditions
        • (TARGET belongs to an ally of (Owner of Triggering Unit) equal to true
        • (Target is Undead) equal to false
      • Then - Actions
        • Unit - Set TARGET life to (Current life of TARGET + (20.00 x (Triggering Unit current Intelligence (include bonuses))))
      • Else - Actions
    • If (All conditions are true) then do (Then actions) else do (Else actions)
      • If - Conditions
        • (TARGET belongs to an enemy of (Owner of Triggering Unit) equal to true
        • (Target is Undead) equal to true
      • Then - Actions
        • Unit - Cause (Triggering Unit) to damage TARGET for (10.00 x (Triggering Unit current Intelligence (include bonuses))) points of attack type Spells and damage type Normal
      • Else - Actions
Death Coil would be the same except you also create the projectile yourself, have to attach data to it about what it's targeting and who cast it, launch it... then wait to detect its impact with the target unit in a separate trigger and from there deal damage or heal.

You can fudge this a little bit by calculating the distance between the target and the caster then dividing by the speed of the missile (an Object Editor field, so your trigger can't 'know'/'learn' the speed, it has to be told) to get the time until impact. Then use the Wait command for that amount of time. This will not be in sync perfectly most of the time, and it can even break spectacularly if the target unit is moving or if the delay is shorter than the shortest possible Wait.

Again I'm not telling you you shouldn't or can't, just that it will be hard if you are not experienced writing triggers or other code. Food for thought before you embark upon this map journey to use hero stats in every spell.
Thank you a lot and i am sorry for the /not correct/ explaining and the mistakes i did. Is there a way to PM you? I can tell you what actually is the idea of the map and what i want to do.
 
Status
Not open for further replies.
Top