StarCraft® II

[HotS] Ability that applies Physics

MVP - StarCraft
I've been trying to make a single-target spell (In the HotS editor) that deals damage and uses the new physics to send a unit flying back.

I haven't gotten it to work. I tried looking at other actors that use physics, but it didn't help.

(I'm trying to apply the same force that is used when an Immortal attacks\kills a unit)

Actors have never been my strong point. An ideas of how exactly to set up an actor to do this?
Edited by TheSkunk on 12/10/2012 2:07 PM PST
Reply Quote
look at the hybrids shockwave ability in the editor and see how that works
Reply Quote
Actor phyiscs in abilities are much easier than in attack action.

You just need to create the force actor in the target point, and everything is done.

If you want explode force, you can test it with 'TestForceHuge'.

While if you want targeted force, you need to create it in the target actor scope, and set the 'Field' property to 'Directional'
Reply Quote
MVP - StarCraft
12/10/2012 07:01 PMPosted by Renee
While if you want targeted force, you need to create it in the target actor scope, and set the 'Field' property to 'Directional'

Yeah, I'm trying to make a single-target spell. I believe I'm simply setting up the actor\actor events wrong: http://i.imgur.com/ZFW9k.png

Again; I'm not very good at actors.. =S
Reply Quote
Developer
Hey TheSkunk, glad you are interested in the new physics system. I think there might be some misunderstanding here so I will try to explain some of the details.

In order for Actor Physics Forces to be applied to an Actor, that Actor needs to be capable of entering ragdoll physics mode. Unit actors can only enter ragdoll mode when the unit is dead because physics are applied and calculated completely asynchronously and can't affect the unit's actual position. Model actors that are not being driven by a unit's position can enter ragdoll mode at any time by simply applying an Actor Force. To apply an Actor Force all you need to do is create the actor at the target position - Force (Sphere) actors are very useful for testing this since they are simple to set up with just a radius. If the force's AoE covers the position of a valid target Model, it will automatically turn on ragdoll mode and apply the force.

If you want to have a damage ability move a unit without killing it, you'll need to set up an Apply Force Effect instead. These forces are synchronous and use a much simpler physics system without any ragdoll. Another method is to turn the target unit into a Missile for abilities that launch the unit from one position to another, but those can be complex to set up and would require a separate explanation.
Reply Quote
MVP - StarCraft
Hey TheSkunk, glad you are interested in the new physics system. I think there might be some misunderstanding here so I will try to explain some of the details.

Unit actors can only enter ragdoll mode when the unit is dead

Ah, for some reason I thought someone told me that wasn't the case. (Edit: I think I was thinking of this: http://us.battle.net/sc2/en/forum/topic/7004454425#5 but I think I understand what they actually meant now)

I guess I can't do quite what I had in mind, then. Thanks for taking the time to answer my post, though.
Edited by TheSkunk on 12/14/2012 12:00 PM PST
Reply Quote
Ultimately, it depend on if the model have physic body or not, and it's phyic state data(on/off, if it recive world force and/or not, it's a kinematic physic body or a dynamic body etc). It all depend on the model file itself.

Most models of living units just don't have physic body, while many death ragedoll models have. They are different models.

But if you set a living unit's model to a ragedoll model, the actor force would still work.

Anyway, the logical postition of the living unit would not be affacted. The new physic engine and the actor forces and are just actor layer things. If you want to move the actual position of a living unit, use Force effects or Teleport effects.
Edited by Renee on 12/15/2012 9:40 PM PST
Reply Quote
MVP - StarCraft
Yeah, I understand that now.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]