I have a small powerplant building that works fine so far, now i want to give it a buildup animation. To keep it simple it could raise from the ground while there are some smoke clouds. How to achieve this?
(I would prefer Lua codes if possible, because i have no experience in making Scripts based on Lua.)
My next 'project'
Moderator: Moderators
Re: My next 'project'
I can't help you out with LUA here but it is quite easy to do in cob:
For fbi/lua definitions and particle effects take a look at the buildings in the cursed. I am using a buildup-animation like the one you are looking for. You should use showNanoFrame = false in the unit definitions though.piece base, buildingbase;
#define DUST 1024+0
Create()
{
structureheight = (get UNIT_HEIGHT)*(-1);
move buildingbase to y-axis structureheight now;
while( get BUILD_PERCENT_LEFT )
{
move buildingbase to y-axis (structureheight * (get BUILD_PERCENT_LEFT)/100) speed [10];
emit-sfx DUST from base;
sleep 50;
}
move buildingbase to y-axis 0 speed [10];
}
Last edited by azaremoth on 02 Sep 2009, 15:59, edited 1 time in total.
Re: My next 'project'
Thanks that works.
Btw what is wrong if my skins show up black ingame?
I have one model wich is correct, one is all housecolour(didnt make the alphachannel there) and two are plain black.
Btw what is wrong if my skins show up black ingame?
I have one model wich is correct, one is all housecolour(didnt make the alphachannel there) and two are plain black.
-
- Posts: 916
- Joined: 27 Jun 2009, 01:32
Re: My next 'project'
Put the models in your mod folder and the textures to the unittextures folder (I guess they already are). Then choose the respective texture1 and texture2 and resave the model. That should give you the textures - it's probably looking for a wrong texture...
Re: My next 'project'
mmm now its orange again, this alpha channel stuff confuses me.
-
- Posts: 916
- Joined: 27 Jun 2009, 01:32
Re: My next 'project'
If you made the models yourself make sure you gave a center, a radius and a height (you can set that in the "Model" tab on the right of the screen)...