A way to stop your own units from getting damaged

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
... with this action. It damages the casterwhen they cast the spell.

Code:
Unit - Cause (Picked unit) to damage circular area after 0.00 seconds of radius 100.00 at (Position of (Picked unit)), dealing 10.00 damage of attack type Normal and damage type Normal

is there a way around it, it is a unit that charges through other units and it deals 10 damage ever 0.05 seconds so because its dealing it so quickly and moving uickly at the same time the caster has 60 damage done to himself. I don't really want that so is there another way?
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
that won't do, that bit of the thing i showed u is from this trigger

Code:
SweepingStrikeMove
    Events
        Time - Every 0.05 seconds of game time
    Conditions
        (SSGroup is empty) Equal to (==) False
    Actions
        Unit Group - Pick every unit in SSGroup and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 50.00 towards (Facing of (Picked unit)) degrees)
                Unit - Cause (Picked unit) to damage circular area after 0.00 seconds of radius 100.00 at (Position of (Picked unit)), dealing 10.00 damage of attack type Normal and damage type Normal

i don't see how i can do that
 

XeNiM666

I lurk for pizza
Reaction score
138
add to a trigger - *your unit* enters within X range of *your unit* in your casting trigger.

Tehn in the seperate trigger, Cause the Caster to damage Triggering Unit. Of course you have to strore Triggering unit in a variable in the casting trigger.
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
that made no sense, english is a virtue. ;)

So im still looking for help, anyone got any ideas that i can read?
 

XeNiM666

I lurk for pizza
Reaction score
138
sorry for the english this is what i mean..

In your first trigger:
Code:
Cast Trigger

Events
Unit starts the effect of an ability

Conditions
Ability being cast == your ability

Actions
set CASTER = Triggering Unit
Create 1 dummy unit at blah blah blah...
add expiration timer to last created unit
add unit in SSGroup
[B]Trigger - Add to [U]Damage Trigger[/U] the Event [U]Unit - A unit enters within X range of Last Created Unit[/U][/B]

Moving trigger:
Code:
SweepingStrikeMove
    Events
        Time - Every 0.05 seconds of game time
    Conditions
        (SSGroup is empty) Equal to (==) False
    Actions
        Unit Group - Pick every unit in SSGroup and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 50.00 towards (Facing of (Picked unit)) degrees)
                Unit - Cause (Picked unit) to damage circular area after 0.00 seconds of radius 100.00 at (Position of (Picked unit)), dealing 10.00 damage of attack type Normal and damage type Normal

Damage Trigger: There is no event here or a condition because you already added an event in the Cast Trigger
Code:
Damage
Events - None
Conditions  - none
Actions
Cause CASTER to damage Triggering unit dealing XXX damage of attack type... and weapon type ...
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
that would be good but theres 4 dummy units created... and it will still damage the casting unit...
 

MoonSlinger

I Love using Cheap Tricks... only Results matters
Reaction score
74
Try this:
Code:
Actions
    Unit Group - Pick every unit in [B]Group1[/B] and do (Actions)
        Loop - Actions
            Set [B]UnitX[/B] = (Picked unit)
            Set [B]Group2[/B] = (Units within 500.00 of (Position of [B]UnitX[/B]))
            Unit Group - Pick every unit in [B]Group2[/B] and do (Actions)
                Loop - Actions
                    Unit - Cause [B]UnitX[/B] to damage (Picked unit), dealing 500.00 damage of attack type Normal and damage type Normal

It should work, so understand and digest, then you will get whatever you need done :D
Also, there are leaks everywhere, you need to clean them in your map.
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
no, the only thing that you were missing XeNiM666 was this bit on the coniditons for the damage trigger

Code:
((Entering unit) belongs to an enemy of Player 1 (Red)) Equal to (==) True

hehe it works perfectly now, pwn ass all right! maybe needs a bit of balancing but other than that its great
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top