• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help with my first ever spell {stun, "shoot" a sword, and teleport target to caster}

Status
Not open for further replies.
Level 8
Joined
Aug 1, 2008
Messages
420
Im making my first ever spell. Its gonna be very complicated. (to me anyway, anyone else could make it in a matter of seconds) I thought of a very original spell but im stuck right at the start lol.
what the spell is: Stuns the unit, Creates a portal near the target, shoots a sword out of it and then it makes the unit walk through it, and the portal ends where the person that casts the spell is, teleporting the target to the caster.

All i need help with (i think) is: how do i create a portal? I want it about 350 range away from the target, facing towards it.
I know how to create it, i just dont know how to make it appear a bit further away and facing it.
Thx in advance :D

PS. I think its something to do with offset or something i dont know :(
 
Level 8
Joined
Aug 1, 2008
Messages
420
Not hard huh? Hmmm ;(
We'll see if i can do it, lol. Thanks :p
But how do i make the portal face the targetted unit?
 
  • Portal
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 Portal for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by 350.00 towards (Angle from (Position of (Triggering unit)) to (Position of (Target unit of ability being cast))) degrees) facing (Angle from (Position of (Triggering unit)) to (Position of (Target unit of ability being cast))) degrees
Just try to use variables, since this trigger leaks..
 
Level 8
Joined
Aug 1, 2008
Messages
420
Yeah im trying to use variables, but which variable will i need to use for the angle? Point? I dont know much about variables, but im studying other peoples spells.
 
Level 8
Joined
Aug 1, 2008
Messages
420
Thanks, and congrats on your 100 posts, lol
Edit: Mephisto can you explain how to do that trigger? thats awfully long for me lol.
2nd Edit: Nvm i found it, lets see if it works...
3rd Edit: It works great, except the portal is the wrong way round, how can i fix that? Seeing as i get lost in that trigger.
 
Last edited:
Here ya go, with variables ;)
  • Portal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to PortalSpell
    • Actions
      • Set Caster = (Triggering unit)
      • Set CasterLoc = (Position of Caster)
      • Set TargetLoc = (Target point of ability being cast)
      • Set OffsetTargetLoc = (TargetLoc offset by 350.00 towards (Angle from CasterLoc to TargetLoc) degrees)
      • Unit - Create 1 Portalfor (Owner of Caster) at OffsetTargetLoc facing (Angle from TargetLoc to CasterLoc) degrees
      • -------- Do your other actions here, if you have any --------
      • Set Portal = (Last created unit)
      • Custom script: call RemoveLocation(udg_CasterLoc)
      • Custom script: call RemoveLocation(udg_TargetLoc)
      • Custom script: call RemoveLocation(udg_OffsetTargetLoc)
Variable NameVariable TypeInitial Value
CasterUnit- None -
CasterLocPoint- None -
OffsetTargetLocPoint- None -
PortalUnit- None -
TargetLocPoint- None -
 
Level 8
Joined
Aug 1, 2008
Messages
420
Now how can i change this thread to [solved]? or can a mod only do it?
And im using your Destiny sword for my sword heh. I just randomly typed in "Sword" in model bit.
Yours was the best that i saw, and i didnt even know it was from you! Lol :p
 
Status
Not open for further replies.
Top