Frictional Games Forum (read-only)
[MDL ED] Projectile Tweaks - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [MDL ED] Projectile Tweaks (/thread-21793.html)



Projectile Tweaks - Daemian - 06-11-2013

Hi,

I did an enemy that shoots rocks at the player.
The projectile comes from a long distance and i'm using script areas to estimate where the player will be in a given time.

It works, the rocks can kill you and the projectile's direction and speed are perfect.

But now i have two problems:

1. The projectile has the gravity of a balloon instead of a heavy rock.
2. I can't make it rotate. I tried using a block box at the spawn to make it spin on collision but it fails sometimes cause the box is static and the projectile's direction and force vary each time.

Is there something in the Model Editor i can do to achieve this?


RE: Projectile Tweaks - PutraenusAlivius - 06-11-2013

I dunno about this, but you might wanna try this out.

1. Enlarge the force.
2. Dunno. Maybe add a rotating animation?


RE: Projectile Tweaks - ExpectedIdentifier - 06-11-2013

(06-11-2013, 02:51 AM)Amn Wrote: Hi,

I did an enemy that shoots rocks at the player.
The projectile comes from a long distance and i'm using script areas to estimate where the player will be in a given time.

It works, the rocks can kill you and the projectile's direction and speed are perfect.

But now i have two problems:

1. The projectile has the gravity of a balloon instead of a heavy rock.
2. I can't make it rotate. I tried using a block box at the spawn to make it spin on collision but it fails sometimes cause the box is static and the projectile's direction and force vary each time.

Is there something in the Model Editor i can do to achieve this?

You need to mess with the rock's properties in the model editor to change how quickly it drops (the gravity) I think. Not sure if increasing the object's mass would work as I think that just affects the speed you can walk while carrying the object Tongue Not sure what you mean about making it rotate.. But there is a function to rotate objects:

Spoiler below!
void RotatePropToSpeed(string& asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string& asOffsetArea);




RE: Projectile Tweaks - FlawlessHappiness - 06-11-2013

Can i ask you one question here? How did you make it throw infinite rocks? How do you manage to throw infinite rocks?

That's what I'm guessing it does.

Checks players position.
Spawns and throws rocks.
Checks playerposition again


RE: Projectile Tweaks - Daemian - 06-11-2013

The rocks have expiration time, in the Model Editor the variable is called LifeLength.

I set it to 8 seconds.

They tend to fall off the map anyways, the player won't notice anything.
This level is just a skybox, rocks and one big enemy.

About the player position, you know we can't get its coords, so i'm using script areas(7) to know where he is or was last seen. For this level, it works great.


Was that what you asked ?


RE: Projectile Tweaks - Rapture - 06-11-2013

You have to set the Max "Angular + Linear" Speed to something like 15, to have it drop at the rate of most entities in Amnesia. (Higher should make it drop even faster) (Mass can be anything I guess, like "2.0" would be a good start)

I'm not sure what the "Angular/Linear" Damping means. The start, or the rate of increase?


RE: Projectile Tweaks - Daemian - 06-12-2013

Hello Rap,
Actually the Max Linear speed is set to unlimited (0).
I tried 15 and more, but still the same results.

I just don't want the player to see the rock falling after it impacts on something cause it doesn't look heavy. If i could detect when it impacts i would add negative y to make it fall faster.

Angular and Lineal Damping is the resistance of the body to move, more like a deceleration, being 1 a lot. Both are set to 0 too.