CreateProjectile does not respect InitialVelocity it seems, but just determine that on the projectiles initial Speed, built into the projectile itself together with the passed position and direction (but does not seem to multiply with direction too, it seems to multiply with a unit vector only, so it's not hackable that way).
How to get InitialVelocity to work?
Also, what is the purpose of the ContextId parameter in an overloaded variant?
CreateProjectile/InitialVelocity
Moderator: NADEO
- Gugli
- Nadeo
- Posts: 536
- Joined: 14 Jun 2010, 17:35
- Location: Mon PC est à Paris, mais mon coeur rode dans les forêts de Lozère
Re: CreateProjectile/InitialVelocity
If I recall correctly, ContextId allow you to specify a number for your projectiles. This number is given back to you when the projectile hits.
For example, imagine a weapon that shoots one bullet that does damage, and a swarm of others that don't damage but slow the opponents. I'll be easier to write the script if you use 2 different ContextIds for those two kinds of projectiles, because the "OnHit" code will be simpler.
Also, InitialVel is to be understood as the Velocity of the "gun" emitting the projectile. The same "gun" is currently located as InitialPosition, rotated towards InitialDirection. Some projectiles can be influenced by the speed of the gun, but I think this setting is not available for you (yet).
For example, imagine a weapon that shoots one bullet that does damage, and a swarm of others that don't damage but slow the opponents. I'll be easier to write the script if you use 2 different ContextIds for those two kinds of projectiles, because the "OnHit" code will be simpler.
Also, InitialVel is to be understood as the Velocity of the "gun" emitting the projectile. The same "gun" is currently located as InitialPosition, rotated towards InitialDirection. Some projectiles can be influenced by the speed of the gun, but I think this setting is not available for you (yet).
--
(>~_~)> â•╦╠╔╦╗ <(~_~<)
(>~_~)> â•╦╠╔╦╗ <(~_~<)
Re: CreateProjectile/InitialVelocity
Ah cool, ContextId certainly has its uses then.
Hoping to see a way to dynamically change the initial speed of a projectile then, it's currently my showstopper at least
.
(edit: GrowingOffset doesn't seem to fire any bullet at all? What's it anyway
?)
Hoping to see a way to dynamically change the initial speed of a projectile then, it's currently my showstopper at least

(edit: GrowingOffset doesn't seem to fire any bullet at all? What's it anyway

=3
- Gugli
- Nadeo
- Posts: 536
- Joined: 14 Jun 2010, 17:35
- Location: Mon PC est à Paris, mais mon coeur rode dans les forêts de Lozère
Re: CreateProjectile/InitialVelocity
For now, to change the speed, you can create different projectile models, with different speeds, and select the one you want in the script. It only allows discrete values, but maybe it is enough for you.
(This way, you can also change the colour or size. It'll be easier for players to evaluate the speed of an incoming missile if the colour is slightly different for each speed
In my experience, it will feel less frustrating)
(This way, you can also change the colour or size. It'll be easier for players to evaluate the speed of an incoming missile if the colour is slightly different for each speed

--
(>~_~)> â•╦╠╔╦╗ <(~_~<)
(>~_~)> â•╦╠╔╦╗ <(~_~<)
Re: CreateProjectile/InitialVelocity
Yea, there are certainly advantages of separate models. I've been trying to decode the file structure of actions to generate a few hundred variants, to no avail :p.
It's quite some work to generate enough variants. Would still love to see this someday.
It's quite some work to generate enough variants. Would still love to see this someday.
=3
Who is online
Users browsing this forum: No registered users and 1 guest