Spin Toss Help

SnoopyLoL

New Member
Reaction score
6
Hello,
I am trying to make a skill where a unit casts a skill named "Spin Toss" on to another unit and what it does is it spins the target unit around the caster and the caster keeps facing it and then when it reaches the caster it bumps the target back to the starting point.
The part I am having trouble is the part where the target :banghead: spirals :banghead: around :banghead: the :banghead: caster!!!:banghead::banghead: A few triggers to make it have a parabola through the air would be appreciated too:D.
This is what I have:

This detects when the ability is casted and sets a few variables to get started.
Code:
Spin Start
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Spin Toss 
    Actions
        Set SpinToss_Spin_Time = 80
        Set SpinToss_Caster = (Casting unit)
        Set SpinToss_End_Point = (Position of (Target unit of ability being cast))
        Unit Group - Add (Target unit of ability being cast) to SpinToss_SpinningUnit

This trigger is where I need help on. This is where the target spirals around the caster until the caster is reached, then it turns on the trigger which bumps it back.
Code:
Spin Periodic
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in SpinToss_SpinningUnit and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        SpinToss_Spin_Time Not equal to 0
                    Then - Actions
                        Set SpinToss_Spin_Time = (SpinToss_Spin_Time - 1)
                        Set SpinToss_Unit_Point = (Position of (Picked unit))
                        [B]Unit - Make SpinToss_Caster face (Picked unit) over 0.00 seconds
                        Set SpinToss_Target_Point = (SpinToss_Unit_Point offset by -10.00 towards (Facing of SpinToss_Caster) degrees)
                        Unit - Move (Picked unit) instantly to SpinToss_Target_Point
                        Unit - Move SpinToss_Caster instantly to (Position of SpinToss_Caster), facing ((Facing of (Triggering unit)) + 6.00) degrees
                        Set SpinToss_Target_Point = (SpinToss_Target_Point offset by 10.00 towards ((Facing of SpinToss_Caster) + 90.00) degrees)
                        Unit - Move (Picked unit) instantly to SpinToss_Target_Point[/B]
                    Else - Actions
                        Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
                        Unit Group - Remove (Picked unit) from SpinToss_SpinningUnit
                        Unit Group - Add (Picked unit) to SpinToss_Throwing_Unit
                        Set SpinToss_Throw_Time = 80

Thank you in advance whoever can answer.:D
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Code:
Unit - Move SpinToss_Caster instantly to (Position of SpinToss_Caster), facing [B]((Facing of (Triggering unit))[/B] + 6.00) degrees.

Try Facing of SpinToss_Caster.

Also your trigger leaks a lot.
 

Trollvottel

never aging title
Reaction score
262
Unit - Make SpinToss_Caster face (Picked unit) over 0.00 seconds


theres no picked unit
 

cleeezzz

The Undead Ranger.
Reaction score
268
yea there is


its under Pick every unit in Spin Group


though its completely pointless because from what i see, theres only one unit in the unit group, might as well remove it and refer to the Target
 

SnoopyLoL

New Member
Reaction score
6
though its completely pointless because from what i see, theres only one unit in the unit group, might as well remove it and refer to the Target
It's a unit group to allow more than one unit to be under the action. :(
Unit - Make SpinToss_Caster face (Picked unit) over 0.00 seconds


theres no picked unit
._. Yes there is...

Try Facing of SpinToss_Caster.

Also your trigger leaks a lot.
1. Thanks, I didn't see that but now the target makes a curve wherever..
2. I know :( But i'm still just a nooby triggerer. I would appreciate it if you could give me some tips for preventing leaking :D.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Import your triggers into a testmap and upload it here. That way I can go through the codes more accurately.
 

SnoopyLoL

New Member
Reaction score
6
Alright then. Be sure to test it too :D
Note: This is just the map I test spells and whatnot. I'm going to place the finished spells into my other maps. :p
 

Kazuga

Let the game begin...
Reaction score
110
Eeh... the unit you use this ability on moves sort of randomly and not even close to around the caster... A tip would be to base it on a wisp wheel.
 

SnoopyLoL

New Member
Reaction score
6
Yeah, I know... BUT THAT IS WHAT I AM TRYING TO DO!!!!! :banghead::banghead::banghead::banghead::banghead::banghead::banghead::banghead:
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Ok this is what I got so far.

Edit: Still leaks like hell since I didn't remove any leaks.
 

Attachments

  • Test Map Editted.w3x
    22.9 KB · Views: 83

SnoopyLoL

New Member
Reaction score
6
Hmmmm... Maybe I should make the time longer?

Edit: WOOT!!!!!!! I DID IT!!! I set the "SpinToss_Spin_Time" to 200 and the "SpinToss_Throw_Time" to 100 and it worked!!!
Now all I need is a parabola... :p Larcenist... Oh, Larcenist... I think you know how to put your "Toss" parabola to replace my throw... Or was that vypur??? I get you two mixed up alot... Because of your avatars...
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Try to increase the SpinToss_Spin_Time variable.

Edit: Sounds like I've got a mission. Just one thing, try set the Spin_Time to 170, it looks a lot better imo.

It's vypur's toss.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I totally lost myself trying to add a Toss feature to that skill, but if you try hard enough I think you'll get it.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
If you're using Vypur's Toss spell then you'd have to replace the variables in the spell-casting trigger to the ones you've got in your spin part, then add them at the bottom of the spin trigger where you add the unit to the Toss group. Then you'll have to activate the parabola functions, replace these variables with your own and it should work.
 

SnoopyLoL

New Member
Reaction score
6
Here's my final. It works fine and looks cool. This also show that you don't need extremely complex triggers to make a nice parabola. :p

EDIT: Well, it's not a parabola but it will do. I'm working on a simple parabola.
 

SnoopyLoL

New Member
Reaction score
6
Done :p here's the link. DOWNLOAD HERE I also fixed a few leaks. It would be nice if someone could show me a place where I can find an index of leak keywords(i.e. "(Center of...")
 
T

thelordof

Guest
Most common leaks are...
Unit groups... Where you use something like Pick every unit in units in playable map area... Fix this by setting a variable (ie TempGroup) to units in playable map area.... then pick every unit in variable... and outside the pick every loop, destroy the unit group.
Locations... Where you refer to a point like a center of a Region/Rect... Fix it by setting a variable (ie TempPoint) to the point and then using the variable instead of the point... then destroy the point.
Specialeffects... Make sure you destroy all your special effects... quite easy to do.
 
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