Page 35 of 59

Re: Mod Question Repository... Questions come in, answers go out

Posted: 18 Aug 2008, 07:01
by Evil4Zerggin
A lot of the COB .h's floating around out there have it.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 22 Aug 2008, 09:21
by REVENGE
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

Posted: 22 Aug 2008, 13:53
by KDR_11k

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

Posted: 22 Aug 2008, 22:58
by REVENGE
What param would I feed it to disable the cmdid I send it?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 22 Aug 2008, 23:32
by KDR_11k
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

Posted: 23 Aug 2008, 07:17
by REVENGE
Ah...I see...

Re: Mod Question Repository... Questions come in, answers go out

Posted: 24 Aug 2008, 20:33
by Das Bruce
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

Posted: 25 Aug 2008, 01:29
by REVENGE
Are transports limited to Gunship flight mechanics? Or could you have them fly like vtols.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 25 Aug 2008, 02:19
by Evil4Zerggin
Unfortunately:

Code: Select all

if ((type == "Builder") || ud->hoverAttack || ud->transportCapacity) {
			CTAAirMoveType* mt = SAFE_NEW CTAAirMoveType(unit);
So it's hardcoded to behave like a gunship.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 25 Aug 2008, 02:26
by Das Bruce
/edit/ slow reply /edit/

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

Posted: 25 Aug 2008, 03:08
by REVENGE
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

Posted: 25 Aug 2008, 03:44
by Das Bruce
It's quite likely, but I can still hope. :roll:

Re: Mod Question Repository... Questions come in, answers go out

Posted: 25 Aug 2008, 23:26
by bobthedinosaur
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?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 26 Aug 2008, 01:28
by Warlord Zsinj
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

Posted: 26 Aug 2008, 02:22
by REVENGE
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.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 27 Aug 2008, 03:22
by Sheekel
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?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 27 Aug 2008, 03:44
by Warlord Zsinj
No; pretty much every 'pure TA' mod since the beginning has wanted this.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 27 Aug 2008, 03:53
by Argh
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.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 30 Aug 2008, 09:01
by bobthedinosaur
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?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 30 Aug 2008, 09:11
by Hoi
A bunker is an (inmobile) transport with the fireplatform=1 (something like that) tag