Page 2 of 2

Re: Spring.EmitWeapon

Posted: 01 Mar 2013, 19:48
by Kloot
No...

Since I'm not making much progress here, let me ask a counter-question: how would you implement SetUnitPosition (or any other SetUnit* Lua callout) if the signature was
SetUnitPosition(number unitDefID, number x, number y, number z)
instead of
SetUnitPosition(number unitID, number x, number y, number z)
...?

Re: Spring.EmitWeapon

Posted: 01 Mar 2013, 20:47
by smoth
No point in continuing if you are getting increasingly frustrated. I am not trying or want to irritate you.

Re: Spring.EmitWeapon

Posted: 02 Mar 2013, 12:40
by Erik
Why and how are projectiles bound to units.
What reason is there for a projectile not to be able to exist without a unit?
It seems there is quite some interest in this function so perhaps if its not too much of a rewrite it could be changed so that a projectile can exist without a unit attached to it that simply doesn't use functions like giving experience to the attached unit.

Re: Spring.EmitWeapon

Posted: 02 Mar 2013, 13:11
by Kloot
weapons != projectiles

I did not say anything about a possible EmitProjectile.

Re: Spring.EmitWeapon

Posted: 03 Mar 2013, 09:18
by gajop
Kloot wrote:weapons != projectiles

I did not say anything about a possible EmitProjectile.
ok so could that be done for all projectiles, e.g. beams/lasers and such?

Re: Spring.EmitWeapon

Posted: 03 Mar 2013, 15:23
by Erik
So what should emit weapon do if not spawn a projectile?

Re: Spring.EmitWeapon

Posted: 03 Mar 2013, 19:03
by smoth
would be nice if it played the firing sound also.

Re: Spring.EmitWeapon

Posted: 04 Mar 2013, 17:43
by FLOZi
Kloot added goodies:

Spring.SpawnProjectile(number weaponDefID, table projectileParams ) -> number projectileID
https://github.com/spring/spring/commit ... 72dc15d75e

Spring.GetProjectileTarget(number projectileID) --> number targetID, string targetType
https://github.com/spring/spring/commit ... cc005b6bb5

Spring.SetProjectileTarget(number projectileID, [number objectID, string objectType] | [number x, number y, number z]) --> boolean
https://github.com/spring/spring/commit ... 760040591c


Easy to play the correct weapon sound via lua imo Smoth.

Re: Spring.EmitWeapon

Posted: 04 Mar 2013, 19:11
by Anarchid
Spring.SetProjectileTarget(number projectileID, [number objectID, string objectType] | [number x, number y, number z]) --> boolean
I <3 u!

Re: Spring.EmitWeapon

Posted: 04 Mar 2013, 19:21
by smoth
it wasn't flozi it was kloot.

Re: Spring.EmitWeapon

Posted: 04 Mar 2013, 19:42
by Anarchid
Oh sorry. Post amended, i love everybody else too!

Re: Spring.EmitWeapon

Posted: 04 Mar 2013, 20:50
by knorke
very nice!
In Spring.SpawnProjectile(number weaponDefID, table projectileParams)
What does projectileParams mean?
The way I understand it one can define some parameters of spawned projectile
https://github.com/spring/spring/commit ... 75e#L3R357
but why those and not others? For example model might have some uses.

Already next step but being able to change params after spawning would be cool, there already is Spring.SetProjectileCEG () which is very lol so maybe Spring.SetProjectileParams (table) is possible?

Re: Spring.EmitWeapon

Posted: 05 Mar 2013, 11:11
by Forboding Angel
Kloot wrote:I did not say anything about a possible EmitProjectile.
Kloot added goodies:

Spring.SpawnProjectile(number weaponDefID, table projectileParams ) -> number projectileID
https://github.com/spring/spring/commit ... 72dc15d75e

Spring.GetProjectileTarget(number projectileID) --> number targetID, string targetType
https://github.com/spring/spring/commit ... cc005b6bb5

Spring.SetProjectileTarget(number projectileID, [number objectID, string objectType] | [number x, number y, number z]) --> boolean
https://github.com/spring/spring/commit ... 760040591c
I would like to have your children. Please provide instructions as to where to apply the lube.
FLOZi wrote:Easy to play the correct weapon sound via lua imo Smoth.
I thought the same myself, as you should just be able to play it at the location you spawned the projectile. However, I didn't because I think smoth may have been referring to something else, but basically... Yeah.

Re: Spring.EmitWeapon

Posted: 05 Mar 2013, 19:00
by Silentwings
That's very useful :D

Re: Spring.EmitWeapon

Posted: 05 Mar 2013, 22:20
by Jools
Forboding Angel wrote:I would like to have your children. Please provide instructions as to where to apply the lube.
Is that a Texan saying?

Re: Spring.EmitWeapon

Posted: 05 Mar 2013, 23:01
by smoth
forb was not from texas, that was lathan stanley

Re: Spring.EmitWeapon

Posted: 26 Oct 2013, 07:40
by smoth
I cannot remember, does this allow us to also emit a weapon that is an explosion?

Re: Spring.EmitWeapon

Posted: 27 Oct 2013, 20:59
by PicassoCT
Your Lightnings are beautifulll