Making a team game and wanted to know how to do this

How do you make a item that’ll heal other players. (I’ve seen it before I just don’t know how to do it)

1 Like

bruh you stupid or something honestly I wish you could like have a way to talk face to face it is so mutch easier when I can talk about stuff in person you know

1 Like

any way not to be rude it’s very easy well for me it is considering I have over 2 years of modd.io coding experience I would consider that very easy but im not going to explain it would take to long and im not going to make a new game to show in video because I have no game space if you need it in your game ask me and add me im alfaPHENEX59 I can just do it its faster and you can just look at it once im done anyways

1 Like
trigger: when unit uses item
 if item type of (triggering item) = (your item)
  then do: for all units in (all units in the game)
                 do: if player type of (owner of (selected unit)) = (the player's team)
                       then do: set (health) of (selected unit) as (health of (selected unit) ) + (number)
                       else do: none
  else do: none
1 Like

alfaPHENEX: complaining that it would take too long.
Me: Just types the code.

1 Like

what if I wanted to heal a player within 500 meters from me and only one player and they have to be the closest one

1 Like

file:///home/chronos/u-5d86975a6199638160d6c0ee3ed1d780ca57c70e/MyFiles/Downloads/Screen%20recording%202022-03-11%204.18.55%20PM.webm

1 Like

You can just set it to deal negative damage from the item’s Weapon tab.

1 Like

i wish you wouldn’t be so rude.

1 Like

(post deleted by euthor)

1 Like

bruh dont do that alfa u kno most of these people are children new to moddio cuz ik I woulda had a hard time doing this when I first joined and also it is rly simple just make it a melee item and make it take to health after that make this script


trigger: when unit is attacked
 if item type of (last attacking item) == (Healer)
   then do:
        if unit type of (last attacked unit) == (Unit)
          then do:
               set entity attribute (health) of (last attacked unit) as (entity attribute(health) of (last attacked unit) + (100))

or you could do this


trigger: when unit is attacked
 if item type of (last attacking item) == (Healer)
   then do:
        if unit type of (last attacked unit) == (Unit)
          then do:
               set entity attribute (health) of (last attacked unit) as (entity attribute(health) of (last attacked unit) + (entity attribute max (health) of (last attacked unit)))

1 Like

yeah im kinda new-ish thanks

1 Like

i played for a while but did 0 codin|making games

1 Like