That's actually going to be pretty hard. Probably the best bet is to use Lua and swap A for D, an identical-looking Unit which can't be shot by C, at the time that Loading occurs.How to prevent C from going for A when A is loaded into B?
Mod Question Repository... Questions come in, answers go out
Moderator: Moderators
Re: Mod Question Repository... Questions come in, answers go out
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Mod Question Repository... Questions come in, answers go out
Ouch, that's not good. I hope a better solution comes about in the future. Do units chase after units in transports that aren't firingplatform?Argh wrote:That's actually going to be pretty hard. Probably the best bet is to use Lua and swap A for D, an identical-looking Unit which can't be shot by C, at the time that Loading occurs.How to prevent C from going for A when A is loaded into B?
Re: Mod Question Repository... Questions come in, answers go out
They get treated like any other Unit, if they're active that way, so that they get engaged correctly, IIRC.
Swapping Units isn't too bad; you can get the target ID in TransportPickup(unitID) in BOS, call Lua, then do the swap, then immediately issue another Load command to the Transport. Just make the D version unable to move, and if the Transport doesn't arrive for whatever reason, swap it back with A after a few seconds. That can potentially be irritating to players, ofc, but IDK how to avoid that otherwise, since Transport behavior is so... eh... hardcoded and unflexible atm.
Swapping Units isn't too bad; you can get the target ID in TransportPickup(unitID) in BOS, call Lua, then do the swap, then immediately issue another Load command to the Transport. Just make the D version unable to move, and if the Transport doesn't arrive for whatever reason, swap it back with A after a few seconds. That can potentially be irritating to players, ofc, but IDK how to avoid that otherwise, since Transport behavior is so... eh... hardcoded and unflexible atm.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Mod Question Repository... Questions come in, answers go out
It wouldn't work well for what I'm doing. I might have to find an alternate solution. I might try making certain units not chase anyone at all, by putting the full set in their nochasecategory, and complementing it with badtargetcategories of units that are likely to be transported.Argh wrote:They get treated like any other Unit, if they're active that way, so that they get engaged correctly, IIRC.
Swapping Units isn't too bad; you can get the target ID in TransportPickup(unitID) in BOS, call Lua, then do the swap, then immediately issue another Load command to the Transport. Just make the D version unable to move, and if the Transport doesn't arrive for whatever reason, swap it back with A after a few seconds. That can potentially be irritating to players, ofc, but IDK how to avoid that otherwise, since Transport behavior is so... eh... hardcoded and unflexible atm.
Re: Mod Question Repository... Questions come in, answers go out
Hmm. Why is it imperative that they not attempt to attack the transport?
I mean... you're talking about mounting guys in a transport, who can apparently shoot at enemies. Either it's a ground transport, and anything should be fair game... or it's an air transport, and you merely have to make it fly high enough to be out've range / targeting cone of most things, so they won't try to attack it anyhow. If you explain what game effect you're after, maybe there's an alternative way to solve your puzzle.
I mean... you're talking about mounting guys in a transport, who can apparently shoot at enemies. Either it's a ground transport, and anything should be fair game... or it's an air transport, and you merely have to make it fly high enough to be out've range / targeting cone of most things, so they won't try to attack it anyhow. If you explain what game effect you're after, maybe there's an alternative way to solve your puzzle.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Mod Question Repository... Questions come in, answers go out
I'm new to working on this stuff so it may be a quirk of some of the weapons. I'm trying out different melee units by experimenting with both the invisible shortrange missile and the actual spring melee weapon type.
The transports are ground transports for the most part, functioning like bunkers in starcraft, but this would apply to a flying transport (which I plan to make, with firingplatform) even more so. I just found that the shortrange units would sometimes not even attack the transport itself and get confused trying to reach the unit inside - very strange. It may be a combination of factors including my anim scripting and weapon setup but that still doesn't make sense to me. I'd rather the attacker not even try to target the transport or the loaded unit at all as it would be 100% futile in some cases (melee vs. air units).
The transports are ground transports for the most part, functioning like bunkers in starcraft, but this would apply to a flying transport (which I plan to make, with firingplatform) even more so. I just found that the shortrange units would sometimes not even attack the transport itself and get confused trying to reach the unit inside - very strange. It may be a combination of factors including my anim scripting and weapon setup but that still doesn't make sense to me. I'd rather the attacker not even try to target the transport or the loaded unit at all as it would be 100% futile in some cases (melee vs. air units).
Re: Mod Question Repository... Questions come in, answers go out
Don't use either. Use a short-term beamweapon that's invisible (texture reference a non-existent texture).I'm new to working on this stuff so it may be a quirk of some of the weapons. I'm trying out different melee units by experimenting with both the invisible shortrange missile and the actual spring melee weapon type.
The melee weapon isn't useful atm. It really needs to be fixed to obey AimWeapon callin behaviors, etc.
OK. Ground transports: you're probably stuck, unless you want to go the Lua route.The transports are ground transports for the most part, functioning like bunkers in starcraft, but this would apply to a flying transport (which I plan to make, with firingplatform) even more so. I just found that the shortrange units would sometimes not even attack the transport itself and get confused trying to reach the unit inside - very strange. It may be a combination of factors including my anim scripting and weapon setup but that still doesn't make sense to me. I'd rather the attacker not even try to target the transport or the loaded unit at all as it would be 100% futile in some cases (melee vs. air units).
Air transports: just make 'em go higher than the ranges used by melee- in a typical fantasy game, that won't be very high up at all. Combine that with weapon arcs, and I can guarantee that nobody will be trying to chase flying transports. A ceiling of 200 or whatever is nothing, don't stress about it. You only need absurd ceilings like I use or Forb does if you have objects tall enough that clipping is a problem on a regular basis.
Re: Mod Question Repository... Questions come in, answers go out
Argh: I'm using "LaserCannon" for melee - reckon it's about the simplest weapon type around since "Melee" itself apparently doesn't work that well.
Do you think BeamWeapon would be more appropriate?
Do you think BeamWeapon would be more appropriate?
Re: Mod Question Repository... Questions come in, answers go out
Use BeamLaser. No flight time, no inaccuracy if you don't want it, obeys turret, won't miss because of hitsphere collisions, etc., etc.
Melee should basically just be BeamLaser without the visuals (imo).
Attached is my Space Chicken basic "claw" weapon, for reference purposes.
Melee should basically just be BeamLaser without the visuals (imo).
Attached is my Space Chicken basic "claw" weapon, for reference purposes.
- Attachments
-
- Claws.zip
- (700 Bytes) Downloaded 27 times
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Mod Question Repository... Questions come in, answers go out
Thanks for the claws. I am working on converting my weapons to use those defs (but greatly enhanced because it's in lua).
Re: Mod Question Repository... Questions come in, answers go out
Here's a problem I've been having for a while. At the moment, I've got weapondefs as lua in the "weapons" folder, in the form
The problem with this is calling the weapons in the (lua) unitdef. When I want to write
then the unit ends up with no weapons; instead I have to write
which loses all the onlyTargetCategory and other information. How do I get this other information into the unitdef? (I've tried things like onlytargetcategory3 = "NOTAIR", but it doesn't seem to be working.)
Code: Select all
local weaponDef =
{
weaponname =
{
... long list of stats...
}
}
return weaponDef
Code: Select all
weapons = {
[1] = {
def = "spikelaser",
badTargetCategory = "BUILDING",
},
[2] = {
def = "spikelaser",
badTargetCategory = "BUILDING",
},
[3] = {
def = "spherespawn",
onlyTargetCategory = "NOTAIR",
mainDir = "0 0 1",
maxAngleDif = 360,
},
},
Code: Select all
weapons =
{
"spikelaser",
"spikelaser",
"spherespawn",
},
Re: Mod Question Repository... Questions come in, answers go out
Hopeful bump.
Also: is there a way to give units hitboxes instead of hitspheres in Upspring? I know The Cursed has mobile units with hitcylinders; how do I give my units something similar?
Also: is there a way to give units hitboxes instead of hitspheres in Upspring? I know The Cursed has mobile units with hitcylinders; how do I give my units something similar?
Re: Mod Question Repository... Questions come in, answers go out
No, you have to use code, either in unitDef or by using Lua or by using COB (it's flexible, and yeah, you can change it).is there a way to give units hitboxes instead of hitspheres in Upspring?
It's documented in the Wiki, but here's a quick example of doing a box collision volume:
Code: Select all
CollisionVolumeType=Box;
CollisionVolumeScales=160 44 160;
CollisionVolumeOffsets=0 22 0;
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
Where exactly?Argh wrote: It's documented in the Wiki,
Re: Mod Question Repository... Questions come in, answers go out
Is it possible to make a vehicle factory with a repair station?
I mean when a damaged vehicle is send to the vehicle factory he moves to the repair station of this building and will be repaired there.
(Does one of the mods have this?)
I mean when a damaged vehicle is send to the vehicle factory he moves to the repair station of this building and will be repaired there.
(Does one of the mods have this?)
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
i dont think it can be done, but construction vehicles and other mobile builders can generally repair other units
Re: Mod Question Repository... Questions come in, answers go out
you could probably model in an extra nano turret or something on the side of the factory and have it disabled by default with its script and usa lua to detect if there are any nearby units that are in need of repair and take control of said turrent via lua to act as the repair station.
Re: Mod Question Repository... Questions come in, answers go out
IIRC the CA airplane plant does something like what you're asking. I'm not sure if it's aircraft-only but it's probably worth a look.
---
At the moment, my WIP game can be easily won by the first person to fly one plane over the enemy base and fire missiles at all the buildings to completely halt unit production. Is there some way of setting up hitspheres or hitboxes so that the under-construction units can't be attacked, or would I need some sort of Lua for this?
---
At the moment, my WIP game can be easily won by the first person to fly one plane over the enemy base and fire missiles at all the buildings to completely halt unit production. Is there some way of setting up hitspheres or hitboxes so that the under-construction units can't be attacked, or would I need some sort of Lua for this?
Re: Mod Question Repository... Questions come in, answers go out
I dont't get how this works. If I build an airplane plant and then a Hawk and after that damage him and give him an order to move to the airplane plant he just starts to guard that building (I think)the CA airplane plant does something like what you're asking

- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
snoop: you want units being built to take no damage until complete?
dude: most mods have a separate unit for aircraft repairing ie repaid pad. are you sure the mod you are playing has a repair pad with the factory?
dude: most mods have a separate unit for aircraft repairing ie repaid pad. are you sure the mod you are playing has a repair pad with the factory?