I need help with stuff, mostly animation

I need help with stuff, mostly animation

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators

Post Reply
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

I need help with stuff, mostly animation

Post by rcdraco »

Ok, for starters, I want to know how to make it so that a unit spins it's top when it is on, but not off,[Possibly a metal extractor pacing script] and make a bubbly effect from my units feet as it moves, to simulate hovering.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Code: Select all

static-var bubblyFeet;

#define FX_BUBBLES 1024
#define SFX_SLEEP_TIME 250
...
SFXLoop()
{
	while (TRUE)
	{
		if (bubblyFeet)
		{
			emit-sfx FX_BUBBLES from feet;
		}
		sleep SFX_SLEEP_TIME;
	}
}
Activate()
{
	start-spin spinning_thing around y-axis speed <45> accelerate <5>;
	bubblyFeet = TRUE;
}
Deactivate()
{
	stop-spin spinning_thing around y-axis decelerate <15>;
	bubblyFeet = FALSE;
}
Create()
{
	start-script SFXLoop();

	// assuming this building is activated by default
	bubblyFeet=TRUE;
	start-spin spinning_thing around y-axis speed <45>;
}
Put an explosion generator effect on the unit which looks like some bubbles and you're set to go.
User avatar
Zoy64
Posts: 454
Joined: 12 Nov 2006, 00:30

Post by Zoy64 »

the code confuses me :?
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

sorry

Post by rcdraco »

I meant 2 different scripts, one where the unit's top spins, and another for hovercrafts where the bubbles come out of the feet.

This is the hovercraft, notice the "feet".
Image

And for a spinner, it is one for my metal extractor, and another for my radar unit.

Image

Image

Strangely enough the script there looks lie a script for a hovercraft radar unit.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Ok, for starters, I want to know how to make it so that a unit spins it's top when it is on, but not off,[Possibly a metal extractor pacing script] and make a bubbly effect from my units feet as it moves*, to simulate hovering.
*moves as in spins
That's what I understood.

Anyway, you should start by decobbling some of TA's COBs (especially hovercrafts or ships) and read through maestro's guide. Or look at other mods which include their scripts as BOS.

You can ignore the post above, I get what you mean with bubbles now.
"emit-sfx 256|3 from piece;" = sea state/bubbles. Piece should be an object with two vertices preferably, although upspring might make a fuss about it.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

or, you know, emit-sfx 259.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

rattle wrote:Piece should be an object with two vertices preferably, although upspring might make a fuss about it.
It does.

Empty objects work fine for me.
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

umm

Post by rcdraco »

I can't seem to figure out how to make a simple script like this, Scriptor doesn't like the script, and won't make a cob. And I don't have the header files anywhere.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

P3374H wrote:
rattle wrote:Piece should be an object with two vertices preferably, although upspring might make a fuss about it.
It does.

Empty objects work fine for me.
Alright, haven't touched ships yet. All I know is that wake pieces in OTA models have two vertices but good to hear.
rcdraco wrote:I can't seem to figure out how to make a simple script like this, Scriptor doesn't like the script, and won't make a cob. And I don't have the header files anywhere.
The header files are where you installed scriptor to.
myself wrote:Anyway, you should start by decobbling some of TA's COBs (especially hovercrafts or ships) and read through maestro's guide. Or look at other mods which include their scripts as BOS.
Post Reply

Return to “Art & Modelling”