Hit a unit . help pls make my new game

hit a unit and get an attribute from the hit. pls help to make my game

1 Like

If you want to get points from the unit you hitted, You can do this script. Remember, the trigger must be “when a unit gets attacked”

  1. if (( unit type of ( last attacked unit ) )) == (<unit name>) then
  2. if (( item type of ( triggering item ) )) = (<item name>) then
  3. set <attribute name> of (owner of ( last attacking unit ) ) as ((( <attirbute name> of ( owner of ( last attacking unit ) ) )) + (<number amount>)
  4. set fading text of ( triggering unit ) as <name>
    You don’t need to do step 5 or 6 but if you need to do that, go to step 5 or 6
  5. if (( random number between <number> and <number> )) == (number) then
    If you want to make a chance to get special points, Repeat step 3 and 4
  6. You need to watch this first if you want to get levels while hitting a unit
    Link: 【Modd.io Tutorial #12】Making EXP level system - YouTube

    If there is something not right, ask me
2 Likes