Realtime Dynamic Weapon Change! - Page 2

Realtime Dynamic Weapon Change!

Requests for features in the spring code.

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Realtime Dynamic Weapon Change!

Post by Argh »

It'd be slow as hell. Getting, storing, and then moving and unpacking all of that would take bloody forever.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Realtime Dynamic Weapon Change!

Post by KDR_11k »

Meh, your unit changwes weapons, I'm sure you could have some effect where it holsters the old one and pulls out the new one (or folds them in/out or wahtever) and noone will complain that the anim resets unless you've got a huge spiderbot with dynamic leg movement and everything.
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Re: Realtime Dynamic Weapon Change!

Post by Archangel of Death »

If it has a certain position it always goes into to change from, that would get rid of any funky animation resets. Just add a function that moves all parts into that positioning for lua to call.

Another, probably not very fast, method would be to have a function to figure out every parts rotations so you can pass them back to a pre-positioning function in your new unit. If figuring that out is actually trivial/fast/fast in lua then it probably would be pretty fast, a least faster than the queue stuff...
You can throw any number of parameters at a lua_Func cob callout. The lua would have to expect the max any unit might have, but it can ignore excess ones easily because of their nill state. The call back into cob might be hairy, I'm not sure what the cob engine does if you try to call a cob function with more parameters than it can accept, or too few, but thats only a problem if your trying to throw it at a unit with a different number of parts than the original (since thats what determines how many position-vars the cob throws out or expects to come in). If its the same number (like bob's infantry, probably all have the same parts), then you only send the ones you got, not the whole list of possibilities (I think lua is funky enough to let you do that).
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: Realtime Dynamic Weapon Change!

Post by Nemo »

Or perhaps just raise the weapon limit to 64, and give BOS a way to tell a unit a weapon is -really- deactivated so that it doesn't still try to aim with it or show its weapon range. I feel like that would be easier than realtime weapon swapping (probably faster, too?)
Post Reply

Return to “Feature Requests”