My next 'project'

My next 'project'

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

My next 'project'

Post by Erik »

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.)
User avatar
azaremoth
Cursed Developer
Posts: 549
Joined: 17 Feb 2005, 22:05

Re: My next 'project'

Post by azaremoth »

I can't help you out with LUA here but it is quite easy to do in cob:
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];
}
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.
Last edited by azaremoth on 02 Sep 2009, 15:59, edited 1 time in total.
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: My next 'project'

Post by Erik »

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.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: My next 'project'

Post by Master-Athmos »

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...
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: My next 'project'

Post by Erik »

mmm now its orange again, this alpha channel stuff confuses me.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: My next 'project'

Post by Master-Athmos »

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)...
Post Reply

Return to “Game Development”