• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

Any class that can support loop animations and taps?

Started by ScarleTomato, January 11, 2009, 10:12:37 AM

Previous topic - Next topic

ScarleTomato

I have a building right now that i want to have a tap and a looping animation. When it is a powerplant, powerlung, or extractor class it will run the loop animation but not create the tap specified in the poweredbuildingclass section. When it is a powered or recycler class it creates the lung fine but only runs the deploy animation and wont run the second animation, the loop one. If i make the loop animation the only one it looks like the beginning of that xsi but wont move.

Any class that can support both a tap and a loop animation?

TheJamsh

i was under the impression that powerplant worked with taps... post the ODF here so we can see

if not then i think youre out of luck, unless you want to use .dll power to make it work (and NK1 has made a loopanimator class for .dll help)


BZII Expansion Pack Development Leader. Coming Soon.

Avatar

I've definitely used taps on Extractor class objects, and posted a picture of it.  The main drawback to using them is the creation of scrap space in the scrap bar.  Seems like it makes a small line even if set to zero.

Depending on the building you can use the loop animation of the lung...

For example, let's say you want a SupplyDepot that has a looping animation.  You make the SupplyDepot a fake or invisible object requiring power iva a lung, and make the lung the part of the building that loops.

-Av-

Nielk1

I've never used taps on an extractor, if you get t working let me know how so I can stop using things ike service bays or relay bunks with extractors tapped onto them!

(Note, Powered can have taps but the addLung function is broken and will not show unless something else is missing a lung.)

Click on the image...

ScarleTomato

an extractor with taps should suit me fine for now, since i know for a fact it supports loop animations. Do you remember which section of code you put it in Avatar? Ive tried GameObjectClass, ExtractorClass, PoweredBuildingClass, and BuildingClass.

Here's a mockup odf ive been using to test it. if yall can modify this to work then it should be easy enough to port over.
Code ("ibpgen.odf") Select
[GameObjectClass]
classLabel = "ibscav"
scrapcost = 0
buildTime = 0

[ExtractorClass]
//PoweredByTaps = false
powerTap1 = "HP_COM_1"
powerName = "ivscout"


ScarleTomato

#5
well ive tried a couple more classes and still cant find any way to support both through one building. Indeed i could create a building with both the lung i want and an animated lung, but i also want the building preview to show the animated part. Which if it is a lung, it wont.

I have another question about the classes though. Are these like C classes? In where you can have certain classes inherit other classes? Like does the PoweredBuilding Class automatically inherit the all the Building Class attributes? Like any PoweredBuilding class object will also use anything the [BuildingClass] section? If so is there any documentation as to what all the classes are children of?

Eh, now that i think about it i suppose if it were that simple, I wouldn't have had to think about it anyways since the powered building class would have then inherited the animation stuff from the gameobjectclass. Ah well, is there anything that could tell me what attributes can be used for the classes?

Avatar

#6
No inheritance in BZ2, but I think that's how DR2 was set up...  Ken posted about it a bit.

All taps go in PoweredBuildingClass for normal buildings, and don't mention Spires because GT's in BZ are actually vehicles disguised as buildings...   :)

[PoweredBuildingClass]
powerTap1 = "HP_TAP_1"
powerName = "fblung"
detectRange = 600

Some of the tricks to doing this the 'old fashioned way' are that the 'lung' building must not own terrain and must supply power:
ownsTerrain = 0
Powercost = -1

The building that has the tap must own terrain and require power:
ownsTerrain = 1 (or contain a terrain__h object)
Powercost = 1

I say 'old fashioned way' because you can specify non-power taps in 1.3 and I haven't experimented enough with that switch... yet...

-Av-

TheJamsh

you can use inheritance in pb4/pb4a. you just need the [blahblah] headers and then to enter any differnet lines in under them.

can be useful. for example, i have effects applied to ALL my weapon crates in BZ2. should i want to adjust it slightly, i can use inheritance so they all inherit effects + physics from one file. easy


BZII Expansion Pack Development Leader. Coming Soon.

Avatar

That's ODF inheritance, where it looks like ST was talking about things like 'poweredbuildingclass' being a subset of 'buildingclass'...  unfortunately in BZ2 each classLabel defines an object that's specified in the game code as a class.   They're all separate chunks of code, and not connected in that way.

-Av-

Nielk1

Oh, It is very likely they are connected as super and child classes, but that is programming, not the front end we use.

HOW DO YOU TAP ONTO AN EXTRACTOR?

I've NEVER had it work.

Click on the image...

ScarleTomato

not sure what im doing different but i can't even seem to get a lung on the extractor. Tried it in 1.2 to see if maybe 1.3 just changed it around somehow and it has the same effect. Heres my scav calling for a powerlung. It deploys and I then end up with -1 power, no lung. it seems like im in Nielk1's boat as well. Here's my ibscav.odf. Care to take a look and see if anything strikes you as odd? The only thing i could think is that for some reason extractors won't let you use HP_COM_1 for taps but that doesn't seem too plausible to me since anything else will.

Avatar

Hmmm, I wish I still had that picture.  I either had an Extractor with a lung or a building with an Extractor for a lung...  I'm thinking now that it was the second, and that's how I found that lungs can't own terrain.  I'm sorry I falsely got your hopes up...

My own test runs just now show just what you found, that the looping buildings won't spawn a tapped object. 

You need a building with a loop animation that allows a tap to create something else?   Would a chain work?  Say, Powered (deploy) taps off whatever you want (say, a GT) that has a lung (loop) that looks like it's part of the original building?

I'd love it if GSH would add a few of the animation support routines that modders like myself and Nielk1 have added to the DLL's.  It's pretty simple to watch for an animation and then start it afte a certain delay.  (well, simple once GSH gave me the code for it... heh)

-Av-

ScarleTomato

ah well, i may try using the chain workaround. I see from commandos modlog that theres support now for more than one type of tap on a building. So I may just have a dummy building with the collision and an invisible mesh so the wireframe preview still shows up and create the animated building and the tap both off of that.

I need to get into dlling more myself. School has started back up now though. Dagum life and its priorities!  :-P

TheJamsh

the best way to do it is to use different tap types on the same powered terrain owning base. only real way.


BZII Expansion Pack Development Leader. Coming Soon.

ScarleTomato