My script doesn’t seem to work right. It’s a script for damage for a projectile. This is the script:
trigger: when unit starts touching projectile
if projectile type of (last touched projectile) == (projectile name)
then do: if (( (owner of last attacking unit) ) is hostile against (owner of (last attacked unit) ) == true
then do: set (entity attribute) of (last touching unit) as (((entity attribute of (last touching unit ) )) - (5)
else do: none