Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Model Editor Help Projectile Tweaks
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#1
Bug  Projectile Tweaks

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?

06-11-2013, 02:51 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Projectile Tweaks

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

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

"Veni, vidi, vici."
"I came, I saw, I conquered."
06-11-2013, 03:39 AM
Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#3
RE: Projectile Tweaks

(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);

(This post was last modified: 06-11-2013, 04:05 AM by ExpectedIdentifier.)
06-11-2013, 04:03 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Projectile Tweaks

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

Trying is the first step to success.
(This post was last modified: 06-11-2013, 11:00 AM by FlawlessHappiness.)
06-11-2013, 10:59 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#5
RE: Projectile Tweaks

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 ?

06-11-2013, 02:46 PM
Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#6
RE: Projectile Tweaks

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?
06-11-2013, 03:54 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#7
RE: Projectile Tweaks

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.

06-12-2013, 05:47 AM
Find




Users browsing this thread: 1 Guest(s)