Summon Unit, no go through doors.

Grags_1977

Ultra Cool Member
Reaction score
32
I desperatly want to add a summon unit ability to my hero.

BUT! I don't want the user to be able to manipulate the "bug?" in the game, that allows them to stand near a door or a paving blocker and summon the unit to the other side.

This isn't just a small problem as it can and will ruin the game. Which is exactly why i've avoided this spell.

It isn't just a simple case of, if summoned unit enters this region then put it in this one. As there are SOO many possible places where this can occur. It would take me a lifetime to catch them all.
 

vypur85

Hibernate
Reaction score
803
Try move the summoned unit to the position of the caster. You can remove the collision first, move to position, and add collision.

Though I'm not sure if this will work in your case as it's not tested.
 

merlinds

Member
Reaction score
15
use a normal summoning unit, then make a trigger like this

Trigger:
  • dfh
    • Events
      • Unit - A unit Starts the Effect of an Ability
    • Conditions
      • (Ability being cast) Igual a Your-Summon-Skill
      • Actions
        • Set SummonerPosit = (Position of (Triggering unit))
        • Set Summon = (Summoned unit)
        • Unit - Turn collision for Summon Off
        • Unit - Move Summon instantly to SummonerPosit
        • Unit - Turn collision for Summon On
 

Grags_1977

Ultra Cool Member
Reaction score
32
I allways fear the worse, and expected the solution to be a lot more complex.

But this works. And MASSIVE! +rep. Thanks again!

EDIT: FFS! I owe you another rep Merlinds.
 

vypur85

Hibernate
Reaction score
803
The event in Post#3 should be 'A unit summons a unit'. 'Starts the effect of an ability' doesn't have 'Summoned unit' as it's event response (...I think, since it was tested and apparently worked).
 

Grags_1977

Ultra Cool Member
Reaction score
32
Yea I did a temporary test before I replied.

Trigger:
  • NO
    • Events
      • Unit - A unit owned by Player 1 (Red) Spawns a summoned unit
    • Conditions
    • Actions
      • Unit - Turn collision for (Summoned unit) Off
      • Unit - Move (Summoned unit) instantly to (Position of Unit_Hero)


I actually tested this after your first post, when I came back to +rep you. Merlinds had allready ninjad your thunder ;)

Obviously, it leaks and stuff, as I say it was just a temporary test. But now I can build on it :)
 

Grags_1977

Ultra Cool Member
Reaction score
32
Hmm, i can't get this working. Because i've based it of Mirror Image.

Trigger:
  • Illusion Cast
    • Events
      • Unit - A unit owned by Player 1 (Red) Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Illusion
    • Actions
      • Set Point_IllusionHeroPosition = (Position of Unit_Hero)


Trigger:
  • Illusion Finish
    • Events
      • Unit - A unit owned by Player 1 (Red) Spawns a summoned unit
    • Conditions
    • Actions
      • Unit - Turn collision for (Summoned unit) Off
      • Unit - Turn collision for (Triggering unit) Off
      • Unit - Move (Summoned unit) instantly to Point_IllusionHeroPosition
      • Unit - Move Unit_Hero instantly to Point_IllusionHeroPosition
      • Custom script: call RemoveLocation( udg_Point_IllusionHeroPosition )
      • Unit - Turn collision for (Summoned unit) On
      • Unit - Turn collision for (Triggering unit) On


I set the casting time to 0.50 secs. To make sure the point was being stored in memory. But it isn't working properly. The summoned unit gets transported to Point_IllusionHeroPosition, But the hero can end up a good few yards away which can bypass paving blockers and doors.

I really don't want to have to go right round the houses and recreate the whole ability on my own. And Mirror Image is probably the perfect ability for what I'm after.
 

merlinds

Member
Reaction score
15
i dont understand why you move the hero and turn his collition of?
can you explain how your skill works?
 

Grags_1977

Ultra Cool Member
Reaction score
32
Don't you pull tongues at me!

This is how the original Mirror image works: The hero disappears whilst the ability runs the special effect. Then randomly places both the hero and the spawned units in a small range around the initial casting point.

My theory was, I needed to create an initial point when casting Mirror Image. Once the hero and the summoned unit is visible, disable both collisions and place both at the initial casting point and then enable both collisions.

But as I say, Only the summoned unit does what i've asked and the hero's position is very random.
 

merlinds

Member
Reaction score
15
Muhuahahahah sufer ander my tongue pulling skill!!!!!
mmmm you say, that with that trigger your hero do not get teleported the same position the summoned unit does?
maybe the off collition is not working on time! try adding a test wait betwen the collition off and the move, and also disable the collision on.
Lets see what happens!
 

vypur85

Hibernate
Reaction score
803
Code:
Event
    A unit Spawns a summoned unit <-- [I]Generic unit event...[/I]
Condition
    [B]Unit-type of (Triggering unit) Equal to YourHeroUnitType[/B] <-- [I]No ability comparison is needed here[/I]
Actions
    Unit - Turn collision for (Triggering unit) Off
    Unit - Turn collision for (Summoning unit) Off
    Unit - Move (Summoned unit) instantly to (Position of (Summoning unit))
    Unit - Turn collision for (Triggering unit) On
    Unit - Turn collision for (Summoning unit) On

As simple as the trigger above. You don't need the first trigger...
Whenever your hero spawns a summoned unit, it is well understood that the hero has casted the spell.

Edit:
After understanding your explanation, I've decided to put this to test.
My bad. Summoning unit is your hero. Triggering unit is your illusion.
 

merlinds

Member
Reaction score
15
defnily the move the unit is not working. The skill works as usual.
When you disable the collition of a few units, move them to the same point and then enable again the collition they stay all in the same spot until moves.
I have made a test map, and get it working. See it:
http://www.epicwar.com/maps/download/189214/b26dc8c0d8683b0680f7d18cf02b9c08e5e9a5b64eb5b5cd/Illutest.w3x

In the second trigger, you will se a "Wait" before the leak removing, i do not know why but without it the trigger does not work!
 

Grags_1977

Ultra Cool Member
Reaction score
32
Merlinds. You're a star mate! :thup:

Your triggers worked perfectly thankyou very much. I owe you one hell of a +rep
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
as long as you remove it every time you use it the wait doesnt matter, the problem is when the ability is cast twice in quick succesion and then the trigger fires twice, saving the variable twice before the variable is destroyed
 

merlinds

Member
Reaction score
15
yes i know the cons of the waits, but have you any idea of why the trigger does not work without the wait??? is really odd since once i destroy the point it is no longer used, but unless i use the wait the trigger does not work at all.
It behaives like if i put the RemoveLocation before all the other actions, but is not!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top