• 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.

[Spell] 3 Dummies Spinning Following Around Caster

Status
Not open for further replies.

BUP

BUP

Level 9
Joined
Sep 9, 2012
Messages
172

Do you guys know how to make the dummies to spin around the caster while attached to the caster.The Problem is the dummies do not spin around but stays attached to the caster wherever he goes.
My Pic
bugym.jpg

My Trigger
trigger.png

Please Tell me how to do it
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Firstly, you've got some major memory leaks here. How to fix them: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

Secondly, you can copy triggers from worldedit using right click -> copy as text (on the whole trigger), and paste it here in
  • tags.
  • Now on to the problem itself - your first 3 actions put the orbs in places relative to the caster, and then they get rotated one increment. When the next loop comes along, instead of being rotated another increment, they are first reset to their positions based on the caster.
  • What you should do is record each orb's angle as a variable, increase that every loop, and move it to a position from the caster using that variable.
 

BUP

BUP

Level 9
Joined
Sep 9, 2012
Messages
172
Can you post some examples i don't know how to do it.
Do you mean i should save each orb's facing angle? or the angle from the caster to orb?
  • Set Essence_1_Angle = (Facing of Essence_1)
or

  • Set Essence_1_Angle = (Angle from (Position of Essence_Caster) to (Position of Essence_1))
btw:I am new here.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Angle from caster to orb.

So let's save everything into variables:
array unit variable - OrbUnit[]
array real variable - OrbAngle[]

When you cast the spell, you'll set
OrbUnit[1] = first orb
OrbUnit[2] = second orb
OrbUnit[3] = third orb

And
OrbAngle[1] = 0
OrbAngle[2] = 120
OrbAngle[3] = 240

Every loop of the spell, you
move OrbUnit[x] to position of caster offset by 300 towards OrbAngle[x]
and then set OrbAngle[x] = OrbAngle[x] + 10 (adjust the 10 for whatever speed you want)
NB: when OrbAngle[x] goes over 360, set it to OrbAngle[x] - 360, things can go funny when angles go above 360.
 
  • Like
Reactions: BUP
Level 20
Joined
Jul 14, 2011
Messages
3,213
Ehm... this is not MUI. Only one unit can cast this ability at the same time. I just wanted to make it clear, In case BUP want's this to be MUI, without knowing it isn't.
 
Status
Not open for further replies.
Top