Like orbit!
Using DE!
I wonder how intensive it actually would be to move/rotate, move/rotate, constantly using triggers. I think it would be much more efficient to use pure data editor, if possible. Willing to accept either actors (I can translate them into turrets) or units.
Thoughts?
I did it with triggers. It is not working right.
The units are actually staggered correctly, oddly enough, but do not spin as quantum offset increases.
ProtossRevolutionsEventsTimer-Every0.1secondsofGameTimeLocalVariablesquantumoffset=(MissionTime)<Real>turrets=1.0<Real>turret_levels=1.0<Real>ConditionsActionsGeneral-While(Conditions)aretrue,do(Actions)Conditionsquantumoffset>(360.0*0.1)ActionsVariable-Setquantumoffset=(quantumoffset-(360.0*0.1))UnitGroup-Pickeachunitin(TowerPhotonCannonunitsin(Entiremap)ownedbyplayerAnyPlayermatchingExcluded:Missile,Dead,Hidden,withatmostAnyAmount)anddo(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)Ifturrets>(360.0/15.0)ThenVariable-Modifyturret_levels:+1.0Variable-Setturrets=0.0ElseVariable-Setquantumoffset=(quantumoffset+(15.0*turrets))Dialog-Settestdiagvariabletextto(Text(quantumoffset)withAnyPrecisiondecimalplaces)for(Allplayers)Unit-Change(Pickedunit)heighttoturret_levelsover0.0secondsUnit-Move(Pickedunit)instantlyto((Positionoftowers[(Ownerof(Pickedunit))]) offset by 1.0 towards quantum offset degrees) (No Blend)
Unit - Make (Picked unit) face quantum offset over 0.0 seconds
Variable - Modify turrets: + 1.0
So I still haven't worked out the code, and it's boggling my head.
What's up there should be at least moving the units in a circle. I can see them definitely trying to face (it's going to have to be changed to SetRotation later, but that's a later problem).
The units all start lining up at the correct points along the ring of the circle, but they don't move along that ring. They just sit there.
make an animation having the sphere rotating around the origin at some radius, and then create the unit at location of the unit you want it revolving around, and play the animation?
xD
I'll post the map of this later, our team figured out how to make this happen via Triggers Give me 24 hours to copy over the relevant data and triggers into a new map and I'll show you how we did it. and I really wish I could figure out a way to do this data side.
Okay I lied it took me like 5 minutes but only cause I didn't setup the map to where the units are already rotating.
Here is an example of units Rotating around another unit. Its pretty fleshed out but since I was lazy I included some extra stuff cause of how the units that rotate appear it was easier to just keep it as is then to go in and modify it. Regardless All you should know is that use any of Elemental Sorcerer's single target moves: "Ignition Burn", "Lightning Blast", and "Ice Shard" 3 times and a small orb will appear and circle around the Sorcerer. You may repeat the process up to 3 times for each type of orb making a total of 9 orbs circling the Sorcerer. If there is a lot of demand ill spend a little more time remove everything that's unnecessary and have the orbs already present and circling, in the meantime this should do well enough.
Okay, first and foremost HOLY CRAP. Thank all of you for replying! I've gotten more replies on this thread in the last 12 hours than all my other threads combined I think. I don't know what I did, but I need to keep doing it.
I looked into site operations (mover), which I assume is what you meant. I see speed and whatnot in there, but nothing for direction / angle / vector. Maybe I'm not looking hard enough, or at the wrong thing.
Couldnt you do this like interceptors are done.... They have a behavior that makes the run through a predetermined path........
I honestly don't know what makes them do that. But the combination of your post and Ultimaswc3 made me think:
Maybe a custom mover could be created for the unit that accomplishes this. I'll look into it if alderis' solution doesn't pan out.
I implemented a data-only orbiting effect using a persistent effect to periodically issue movement orders to the orbiting unit using offsets from the host unit.
It worked perfectly for orbiting around a stationary host. Unfortunately it didn't work well when the host unit was moving, as the orbiting unit would tend to fall behind. To do it correctly would require adding the velocity from the orbit movement with the host unit's velocity, and I'm not really sure this can be done without triggers. Even if it could, the solution would be so incredibly complex that it would beg the question, why not just use triggers in the first place?
That works fine for his purposes, as he can have an uncommandable unit move.
Unfortunately for me, I want the player to be able to tell the unit to attack.
While keeping "move" off the command card should make it so that issue order works but player-input doesn't, that would mean modifying a whole slew of weapons to be capable of "fire while moving".
Though it's pretty much the same thing as what I have here:
But for some reason, mine will plot all the units evenly spaced around the tower, without ever moving them. It doesn't make any sense.
Edit: Actually, I might be able to make this work.
Riley, could you show how you set that up? I got the basics, but I'm having trouble with the offset. I'm thinking maybe you used periodic offsets with X,Y instead of degrees?
Riley, could you show how you set that up? I got the basics, but I'm having trouble with the offset. I'm thinking maybe you used periodic offsets with X,Y instead of degrees?
----
Yes that's right, it's pretty basic trigonometry: x = r * cos(theta), y = r * sin(theta) where r is the radius of the orbit. I think I split it up into 30' increments, so 12 total offsets starting at 0' and going clockwise around in a circle.
Effect -> Periodic offsets only has fields for reals.
Did you use triggers in addition to the effects? I'm not seeing where I can plug in anything that complex.
Like orbit!
Using DE!
I wonder how intensive it actually would be to move/rotate, move/rotate, constantly using triggers. I think it would be much more efficient to use pure data editor, if possible. Willing to accept either actors (I can translate them into turrets) or units.
Thoughts?
I did it with triggers. It is not working right.
The units are actually staggered correctly, oddly enough, but do not spin as quantum offset increases.
You mean like WC3 frozen throne's Blood Mage hero had? two spheres?
Well I have been meaning to try to make this happend but never went in to it. In wc3 it was easy since it already existed.
So I still haven't worked out the code, and it's boggling my head.
What's up there should be at least moving the units in a circle. I can see them definitely trying to face (it's going to have to be changed to SetRotation later, but that's a later problem).
The units all start lining up at the correct points along the ring of the circle, but they don't move along that ring. They just sit there.
Anyone have any ideas why?
@SycoPrime: Go
Could you simply make the model like this
make an animation having the sphere rotating around the origin at some radius, and then create the unit at location of the unit you want it revolving around, and play the animation? xD
Would be much less work and cpu stress.
Likely, and you are right about the CPU stress, but I'd really rather not muck around with modeling software.
Is this something mover actors can accomplish?
@Ultimaswc3: Go
Couldnt you do this like interceptors are done.... They have a behavior that makes the run through a predetermined path........
Not sure if this is what you are looking for but it probably at least has some information about it. http://forums.sc2mapster.com/resources/trigger-libraries/5769-library-galaxy-orbit-v0-2/
@lothar9999: Go
I'll post the map of this later, our team figured out how to make this happen via Triggers Give me 24 hours to copy over the relevant data and triggers into a new map and I'll show you how we did it. and I really wish I could figure out a way to do this data side.
@lothar9999: Go
That's a physics based solution which is much more than he would want I imagine.
Okay I lied it took me like 5 minutes but only cause I didn't setup the map to where the units are already rotating.
Here is an example of units Rotating around another unit. Its pretty fleshed out but since I was lazy I included some extra stuff cause of how the units that rotate appear it was easier to just keep it as is then to go in and modify it. Regardless All you should know is that use any of Elemental Sorcerer's single target moves: "Ignition Burn", "Lightning Blast", and "Ice Shard" 3 times and a small orb will appear and circle around the Sorcerer. You may repeat the process up to 3 times for each type of orb making a total of 9 orbs circling the Sorcerer. If there is a lot of demand ill spend a little more time remove everything that's unnecessary and have the orbs already present and circling, in the meantime this should do well enough.
Rotating Units
I just uploaded it as an asset, no clue since its still pending if you can access it or not but should be available shortly.
Okay, first and foremost HOLY CRAP. Thank all of you for replying! I've gotten more replies on this thread in the last 12 hours than all my other threads combined I think. I don't know what I did, but I need to keep doing it.
I looked into site operations (mover), which I assume is what you meant. I see speed and whatnot in there, but nothing for direction / angle / vector. Maybe I'm not looking hard enough, or at the wrong thing.
I honestly don't know what makes them do that. But the combination of your post and Ultimaswc3 made me think:
Maybe a custom mover could be created for the unit that accomplishes this. I'll look into it if alderis' solution doesn't pan out.
Like he said, I'd really rather not implement a whole physics library for this :P But thank you!
Looking into alderis' solution now. Will be replying back soon with results.
I implemented a data-only orbiting effect using a persistent effect to periodically issue movement orders to the orbiting unit using offsets from the host unit.
It worked perfectly for orbiting around a stationary host. Unfortunately it didn't work well when the host unit was moving, as the orbiting unit would tend to fall behind. To do it correctly would require adding the velocity from the orbit movement with the host unit's velocity, and I'm not really sure this can be done without triggers. Even if it could, the solution would be so incredibly complex that it would beg the question, why not just use triggers in the first place?
The pertinent code from alderis' map:
That works fine for his purposes, as he can have an uncommandable unit move.
Unfortunately for me, I want the player to be able to tell the unit to attack.
While keeping "move" off the command card should make it so that issue order works but player-input doesn't, that would mean modifying a whole slew of weapons to be capable of "fire while moving".
Though it's pretty much the same thing as what I have here:
But for some reason, mine will plot all the units evenly spaced around the tower, without ever moving them. It doesn't make any sense.
Edit: Actually, I might be able to make this work.
Riley, could you show how you set that up? I got the basics, but I'm having trouble with the offset. I'm thinking maybe you used periodic offsets with X,Y instead of degrees?
Riley, could you show how you set that up? I got the basics, but I'm having trouble with the offset. I'm thinking maybe you used periodic offsets with X,Y instead of degrees?
----
Yes that's right, it's pretty basic trigonometry: x = r * cos(theta), y = r * sin(theta) where r is the radius of the orbit. I think I split it up into 30' increments, so 12 total offsets starting at 0' and going clockwise around in a circle.
Effect -> Periodic offsets only has fields for reals.
Did you use triggers in addition to the effects? I'm not seeing where I can plug in anything that complex.
@SycoPrime: Go
I think he calculated the offsets by hand and entered them?
Quote from Ultimaswc3:
@SycoPrime: Go
I think he calculated the offsets by hand and entered them?
----
To the extent that Excel counts as by hand, yes.