Page 41 of 59
Re: Mod Question Repository... Questions come in, answers go out
Posted: 01 Sep 2009, 08:03
by yuritch
In other words,
Code: Select all
QueryLandingPad(pad1, pad2, pad3, pad4)
{
pad1 = landing1;
pad2 = landing2;
pad3 = landing3;
pad4 = landing4;
}
This tells the engine that a unit has 4 landing pads (named landing1 - landing4 in model piece hierarchy), and aircraft will use all of those. AFAIK you can add more parameters for QueryLandingPad (spring supports more than 4 afaik) or you can use less (1 as in smoth's example).
fbi tags are easy. The air repair pad should have workertime greater than 0 (to be able to repair damage), and it should be isAirBase=1. Maybe there's something else too, can't remember right now (try with those two, if it doesn't work - look into air repair pad from BA for tags for ex.).
Re: Mod Question Repository... Questions come in, answers go out
Posted: 01 Sep 2009, 19:50
by Gnomre
I've made a unit with something like 15 or 16 landing pads before which worked fine.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 01 Sep 2009, 22:57
by Tobi
And if you need more just use QueryLandingPadCount too...
Re: Mod Question Repository... Questions come in, answers go out
Posted: 02 Sep 2009, 00:08
by bobthedinosaur
wonderful. i just need to figure out how to jam a bomb type weapon because they apparently route around any kind of jamming done in the aimweaponX() scripts.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 03 Sep 2009, 02:33
by bobthedinosaur
apparently removing turret=1 removes the aimweapon script.
any how i am having trouble with idiot units that attack neutral units more than the enemy and i am trying to us
OnlyTargetCategory1=NOTAIR;
can i used multiple categories in fbi or does that only work in lua with the
OnlyTargetCategory1 = [notair pinkbears yellowsubmarines],
?
Re: Mod Question Repository... Questions come in, answers go out
Posted: 03 Sep 2009, 04:08
by Evil4Zerggin
Works in both.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 03 Sep 2009, 05:18
by Argh
any how i am having trouble with idiot units that attack neutral units more than the enemy
If you want Units to be Neutral, you have to assign that with Lua.
If they aren't set as Neutral, they will get targeted, unless avoidNeutral is set to true in the weaponDef, in which case they can't be forced to attack Neutrals at all (i.e., this is not the preferred way to go about this- if you want selected Units that cannot target other, selected Units at all, such as a Unit that can shoot at aircraft, but not at high-speed aircraft that it cannot hit, use Lua and intercept the attack command).
Re: Mod Question Repository... Questions come in, answers go out
Posted: 04 Sep 2009, 21:50
by bobthedinosaur
what was wrong is that units dont use badtarget like they should but onlytarget is the way to stop stupid targeting
Re: Mod Question Repository... Questions come in, answers go out
Posted: 05 Sep 2009, 03:38
by bobthedinosaur
is there a way to have units that can cloak not have cloak on for default/ when they spawn?
Re: Mod Question Repository... Questions come in, answers go out
Posted: 05 Sep 2009, 05:35
by Argh
Yes. startCloaked = 0, IIRC.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 05 Sep 2009, 07:33
by Saktoth
What a wonderfully helpful community we have!
Re: Mod Question Repository... Questions come in, answers go out
Posted: 05 Sep 2009, 08:04
by bobthedinosaur
yes. merci beaucoup
edit: just for any one else its not startcloak
it is:
initcloaked
Re: Mod Question Repository... Questions come in, answers go out
Posted: 07 Sep 2009, 18:13
by bobthedinosaur
was wondering what are the major reasons ceg sfx are not showing up?
i notice that on some of my mods even if i copy paste them from a working mod and get their images, and update the resource file they still arent showing up.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 07 Sep 2009, 20:34
by Argh
LOL, sorry, I thought it was startcloaked. You are correct.
For CEGs that don't show up... basically, it depends on rendering order. I wrote stuff about that in the documentation of P.U.R.E.:
1. Precedence of Custom Explosion Generators (hereafter referred to as CEGs) in the z-buffer is determined by what order they are called in. For all non-CSphereParticleSpawner CEGs, it is therefore extremely important to draw them FIRST. If you're having trouble with something disappearing, but if it works on its own, then this may very well be the cause.
2. If a CSimpleGroundFlash == size / position of another particle, it will not draw, despite order of z-buffer precedence. Therefore, size it 1 unit greater than the relevant explosion (usually a CSphereParticleSpawner) to achieve proper drawing behavior. This can be masked with the level of grayscale, of course.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 07 Sep 2009, 23:20
by bobthedinosaur
What can effect the rendering order, and how does one go about changing that?
I just don't get it why it works on some mods but not others.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 08 Sep 2009, 08:25
by KDR_11k
bobthedinosaur wrote:wonderful. i just need to figure out how to jam a bomb type weapon because they apparently route around any kind of jamming done in the aimweaponX() scripts.
BlockShotX(targetID,block), set block to 1 to block the weapon. Polled once per frame so don't use expensive calculations on swarm units.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 09 Sep 2009, 03:35
by bobthedinosaur
do moverates in the bos even work any more in aircraft? i cant seem to use them to call on any scripts.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 09 Sep 2009, 07:20
by Argh
What can effect the rendering order, and how does one go about changing that?
I just don't get it why it works on some mods but not others.
OK, those are two different issues.
1. Rendering order appears to be in the order they're written, in a CEG. So, write CEGs with the the things you don't want any chance of being culled due to depth-test first (such as ground flashes).
2. If it's not working, then most likely you have a borked texture reference, or a bad CEG reference. It's as simple as that, really, and you'll need to check each reference carefully.
Re: Mod Question Repository... Questions come in, answers go out
Posted: 09 Sep 2009, 17:07
by bobthedinosaur
i got the cegs working, thanks. I'm just trying to figure out how to throw in plane wing mist lines but only when the plane is moving at a high rate. the move rates don't seem to work any more probably left over from TA, so i guess the best way would just be a speed calc?
Re: Mod Question Repository... Questions come in, answers go out
Posted: 09 Sep 2009, 18:29
by Argh
You can actually query the velocity of the Unit directly via COB --> Lua, Bob. I usually just cheat, and use a timer that goes off after it's been flying for awhile.