Mod Question Repository... Questions come in, answers go out
Moderator: Moderators
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Mod Question Repository... Questions come in, answers go out
A lot of the COB .h's floating around out there have it.
Re: Mod Question Repository... Questions come in, answers go out
I posted the following in the lua forum, but I want to know if there's a better, non lua way of going about this. Basically, I want a unit to be able to move around, but I want to prevent players from issuing the "Move" order. canmove=0 won't do, because this disables movement entirely. Here's my post:
Ok, say I use RemoveUnitCmd to prevent a player from issuing CMD.MOVE to a certain unit.
But if I select this unit, along with another unit who's CMD.MOVE is not disabled, then every MOVE command I issue to the other unit is carried over to my move disabled unit, essentially allowing it to move again.
Is there anyway to prevent this from happening?
Re: Mod Question Repository... Questions come in, answers go out
Code: Select all
function gadget:AllowCommand(u, ud, team, cmd, param, opt, synced)
if ud == whateverunitdefitis then
return synced
end
return true
end
Re: Mod Question Repository... Questions come in, answers go out
What param would I feed it to disable the cmdid I send it?
Re: Mod Question Repository... Questions come in, answers go out
Um, what? You just make the if condition say what you want it to say...
Re: Mod Question Repository... Questions come in, answers go out
Making an aircraft able to transport seems to make it fly like traditional OTA transports, ie like a bloated cow. Is there any way around this?
Re: Mod Question Repository... Questions come in, answers go out
Are transports limited to Gunship flight mechanics? Or could you have them fly like vtols.
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Mod Question Repository... Questions come in, answers go out
Unfortunately:
So it's hardcoded to behave like a gunship.
Code: Select all
if ((type == "Builder") || ud->hoverAttack || ud->transportCapacity) {
CTAAirMoveType* mt = SAFE_NEW CTAAirMoveType(unit);
Re: Mod Question Repository... Questions come in, answers go out
/edit/ slow reply /edit/
That sucks, any chance of a patch? Will it work if you just removed that clause?
That sucks, any chance of a patch? Will it work if you just removed that clause?
Re: Mod Question Repository... Questions come in, answers go out
What's the code that dictates how the loading is done? I'm assuming it's going to be special, hardcoded stuff for air transports, which might not work with vtol type aircraft movement.
Re: Mod Question Repository... Questions come in, answers go out
It's quite likely, but I can still hope. 

- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
trying to make a builder that can construct 100s of units (land units) very fast, factories just jam up because vehicles can move out of the way as they are near insta build speed, so i tried it out as a flier with manual building type construction style (for mobile units) but it will build about 2 at a time an then get distracted and starts slowly drifting away. any suggestions on how to get this to work?
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: Mod Question Repository... Questions come in, answers go out
That's not half the problem. It wouldn't be so bad if gunships behaved with any semblance of intelligence...
Re: Mod Question Repository... Questions come in, answers go out
Does it need to fly? Otherwise, I'd suggest something like a nanotower with a *very* fast turn-rate and as much build power as you would need to crank stuff out at speed.
You could do altshift build and make a field of units quickly if it pleases you so. With the unit-mover gadget from CA, you could have it build a line of units with Repeat On, and the units will automatically move out of the way after being built.
You could do altshift build and make a field of units quickly if it pleases you so. With the unit-mover gadget from CA, you could have it build a line of units with Repeat On, and the units will automatically move out of the way after being built.
Re: Mod Question Repository... Questions come in, answers go out
Units in OTA does not fire automatically on radar targets unless you have built the radar targeting building. Is there a setting for weapons or units in spring to enable this feature?
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: Mod Question Repository... Questions come in, answers go out
No; pretty much every 'pure TA' mod since the beginning has wanted this.
Re: Mod Question Repository... Questions come in, answers go out
That would be fairly easy Gadget code, but it'd require COB integration, I think, because there is no call-in for a unit's aiming state(iirc)- it would have to call Lua and then cancel a command to aim if the target's state ~= visible and there weren't any Targeting Centers built, basically.
TBH, I always hated that part of OTA, because it ate so much micro-time, but it'd be quite easily done via COB-->Lua, imo.
TBH, I always hated that part of OTA, because it ate so much micro-time, but it'd be quite easily done via COB-->Lua, imo.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
so im trying to make a unit behave like a bunker. it is a mobile unit that can not move or rotate and has fireplatform true, (this works fine) it also has a large hit sphere than units that can be loaded into it, however it seems the units that are loaded are take more damage and are hit by enemy fire more often. so i tried throwing a shield weapon on it and the same thing happens. fire goes thru it and kills the unit inside, not offering any bonus for the units inside by having the bunker take the brunt of damage.
any suggestions?
any suggestions?
Re: Mod Question Repository... Questions come in, answers go out
A bunker is an (inmobile) transport with the fireplatform=1 (something like that) tag