another lame lua question
Moderator: Moderators
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
another lame lua question
i was wondering if any one has been working on lua concepts that would allow for multiple model or multiple units stacked to work?
ie: a soldier unit with no weapons who can pick up an assortment of weapons to use. just one example i can think of...
ie: a soldier unit with no weapons who can pick up an assortment of weapons to use. just one example i can think of...
Re: another lame lua question
That would still be limited by the actual weapon code, you can draw a gun but you can't add an actual gun.
Re: another lame lua question
But if you want him to pick up a gun, you're better off making the gun a unit already.
Re: another lame lua question
Probably the easiest way to do this would be to model the gun, have the soldier have all possible models of gun built into its model, then have the soldier's LUA interact with the gun Unit, thereby activating that gun, then use BOS to activate or deactivate said gun. If all weapon calls went to a common call-script with branches for the specifics of aiming, it'd even run pretty fast.
The big problem then would be the weird movement behaviors that would result from the Unit logic. Unless PressureLine's attempt to fuse .S3Os eventually reaches fruition, that's probably the single fastest way to go here.
Hmm. Can we rewrite OnlyTargetCategory on the fly, or is that strictly read-only? That'd take care of quite a lot of bork, in that area...
The big problem then would be the weird movement behaviors that would result from the Unit logic. Unless PressureLine's attempt to fuse .S3Os eventually reaches fruition, that's probably the single fastest way to go here.
Hmm. Can we rewrite OnlyTargetCategory on the fly, or is that strictly read-only? That'd take care of quite a lot of bork, in that area...
Re: another lame lua question
It'd be better to have one unit per weapon and just "morph".
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: another lame lua question
i think kdr has the best idea, now what about making pilot units jump in a vehicle and maybe able to dismount/ eject?
Re: another lame lua question
fwiw, LuaRules/unsynced can easily swap out model
piece display lists using the UnitRendering interface
piece display lists using the UnitRendering interface

- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: another lame lua question
im thinking of a mod thats based around the infantry concept, and is more about modding the regular infantry guy with what ever weapons/ vehicles are for the mission design. how ever spring is kind of a tank big robot and bombe type platform, maybe i should look at another engine?
Re: another lame lua question
Yeah but not the weapon or the unit's behaviour (e.g. moving in range).trepan wrote:fwiw, LuaRules/unsynced can easily swap out model
piece display lists using the UnitRendering interface
Re: another lame lua question
fwiw, LuaRules/unsynced can easily swap out model
piece display lists using the UnitRendering interface
Can you, maybe, write an example, showing a one-time swap? I'd very, very gladly use this for a few things, it'd save a lot of trouble for a few things I'd like to try out.
piece display lists using the UnitRendering interface
Can you, maybe, write an example, showing a one-time swap? I'd very, very gladly use this for a few things, it'd save a lot of trouble for a few things I'd like to try out.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: another lame lua question
ideas for making a weapon pick up? maybe have empty base soldiers be a transport and pick up a weapon which depending on the type morphs it into that "soldier with that weapon" and could possibly drop them to go back to base soldier, how ever, while morphing how does one go about transferring the health of the old unit to the new one?
Re: another lame lua question
Transferring health is easy, just use SetUnitHealth. Transporting stuff would be more problematic because the soldiers wouldn't know they're armed.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: another lame lua question
hmm so detection radius?