Mod Question Repository... Questions come in, answers go out - Page 41

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

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Locked
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

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

Post 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.).
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

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

Post by Gnomre »

I've made a unit with something like 15 or 16 landing pads before which worked fine.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

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

Post by Tobi »

And if you need more just use QueryLandingPadCount too...
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

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

Post 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.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

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

Post 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],

?
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

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

Post by Evil4Zerggin »

Works in both.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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).
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

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

Post by bobthedinosaur »

what was wrong is that units dont use badtarget like they should but onlytarget is the way to stop stupid targeting
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

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

Post by bobthedinosaur »

is there a way to have units that can cloak not have cloak on for default/ when they spawn?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post by Argh »

Yes. startCloaked = 0, IIRC.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

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

Post by Saktoth »

What a wonderfully helpful community we have!
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

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

Post by bobthedinosaur »

yes. merci beaucoup

edit: just for any one else its not startcloak
it is:
initcloaked
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

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

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

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

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

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

Post 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.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

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

Post by bobthedinosaur »

do moverates in the bos even work any more in aircraft? i cant seem to use them to call on any scripts.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

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

Post 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?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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.
Locked

Return to “Game Development Tutorials & Resources”