Spring.EmitWeapon - Page 2

Spring.EmitWeapon

Requests for features in the spring code.

Moderator: Moderators

Kloot
Spring Developer
Posts: 1865
Joined: 08 Oct 2006, 16:58

Re: Spring.EmitWeapon

Post by Kloot » 01 Mar 2013, 19:48

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)
...?
0 x

User avatar
smoth
Posts: 22298
Joined: 13 Jan 2005, 00:46

Re: Spring.EmitWeapon

Post by smoth » 01 Mar 2013, 20:47

No point in continuing if you are getting increasingly frustrated. I am not trying or want to irritate you.
0 x

User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: Spring.EmitWeapon

Post by Erik » 02 Mar 2013, 12:40

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.
0 x

Kloot
Spring Developer
Posts: 1865
Joined: 08 Oct 2006, 16:58

Re: Spring.EmitWeapon

Post by Kloot » 02 Mar 2013, 13:11

weapons != projectiles

I did not say anything about a possible EmitProjectile.
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: Spring.EmitWeapon

Post by gajop » 03 Mar 2013, 09:18

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?
0 x

User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: Spring.EmitWeapon

Post by Erik » 03 Mar 2013, 15:23

So what should emit weapon do if not spawn a projectile?
0 x

User avatar
smoth
Posts: 22298
Joined: 13 Jan 2005, 00:46

Re: Spring.EmitWeapon

Post by smoth » 03 Mar 2013, 19:03

would be nice if it played the firing sound also.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6108
Joined: 29 Apr 2005, 01:14

Re: Spring.EmitWeapon

Post by FLOZi » 04 Mar 2013, 17:43

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.
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: Spring.EmitWeapon

Post by Anarchid » 04 Mar 2013, 19:11

Spring.SetProjectileTarget(number projectileID, [number objectID, string objectType] | [number x, number y, number z]) --> boolean
I <3 u!
Last edited by Anarchid on 04 Mar 2013, 19:42, edited 2 times in total.
0 x

User avatar
smoth
Posts: 22298
Joined: 13 Jan 2005, 00:46

Re: Spring.EmitWeapon

Post by smoth » 04 Mar 2013, 19:21

it wasn't flozi it was kloot.
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: Spring.EmitWeapon

Post by Anarchid » 04 Mar 2013, 19:42

Oh sorry. Post amended, i love everybody else too!
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Spring.EmitWeapon

Post by knorke » 04 Mar 2013, 20:50

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?
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14589
Joined: 17 Nov 2005, 02:43

Re: Spring.EmitWeapon

Post by Forboding Angel » 05 Mar 2013, 11:11

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.
0 x

User avatar
Silentwings
Moderator
Posts: 3586
Joined: 25 Oct 2008, 00:23

Re: Spring.EmitWeapon

Post by Silentwings » 05 Mar 2013, 19:00

That's very useful :D
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: Spring.EmitWeapon

Post by Jools » 05 Mar 2013, 22:20

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?
0 x

User avatar
smoth
Posts: 22298
Joined: 13 Jan 2005, 00:46

Re: Spring.EmitWeapon

Post by smoth » 05 Mar 2013, 23:01

forb was not from texas, that was lathan stanley
0 x

User avatar
smoth
Posts: 22298
Joined: 13 Jan 2005, 00:46

Re: Spring.EmitWeapon

Post by smoth » 26 Oct 2013, 07:40

I cannot remember, does this allow us to also emit a weapon that is an explosion?
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10229
Joined: 24 Jan 2006, 21:12

Re: Spring.EmitWeapon

Post by PicassoCT » 27 Oct 2013, 20:59

Your Lightnings are beautifulll
0 x

Post Reply

Return to “Feature Requests”