CreateProjectile/InitialVelocity

Discuss everything related to custom data creation.

Moderator: NADEO

Post Reply
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

CreateProjectile/InitialVelocity

Post by TGYoshi »

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?
=3
User avatar
Gugli
Nadeo
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

Post by Gugli »

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).
--
(>~_~)> ═╦═ ╔╦╗ <(~_~<)
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: CreateProjectile/InitialVelocity

Post by TGYoshi »

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 :P.

(edit: GrowingOffset doesn't seem to fire any bullet at all? What's it anyway :P?)
=3
User avatar
Gugli
Nadeo
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

Post by Gugli »

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)
--
(>~_~)> ═╦═ ╔╦╗ <(~_~<)
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: CreateProjectile/InitialVelocity

Post by TGYoshi »

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.
=3
Post Reply

Return to “Title Pack & Custom Data Creation”

Who is online

Users browsing this forum: No registered users and 1 guest