About Meshing: Playing Loop animations.

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

About Meshing: Playing Loop animations.

Postby ~DJ~ » Mon Apr 13, 09 5:53 am

Hey guys!

I need help at meshing, probably coding, well, okay so i have done my mesh, made the animation, and imported my mesh, its a ceiling fan. All is fine, but there is ONE problem.. my code is something like this:

Code: Select all

//=============================================================================
// DJFan.
//=============================================================================
class DJFan extends DeusExDecoration;

var bool bOn;

function Frob(Actor Frobber, Inventory frobWith)
{
   Super.Frob(Frobber, frobWith);

   if (bOn)
   {
      PlaySound(sound'Switch4ClickOff');
      PlayAnim('On');
   }
   else
   {
      PlaySound(sound'Switch4ClickOn');
      PlayAnim('Still');
   }

   bOn = !bOn;
}


defaultproperties
{
     bHighlight=True
     ItemName="Celling Fan"
     bPushable=False
     Physics=PHYS_None
     Mesh=LodMesh'TestMod.CellingFan'
     CollisionRadius=17.660000
     CollisionHeight=16.240000
     bCollideWorld=False
     bFixedRotationDir=True
     Mass=500.000000
     Buoyancy=100.000000
     BindName="Fan"
     Skin=Texture'TestMod.CellingFanTex0'
}



taken from Switches at Deus Ex


The problem is:

The animation is well, runs well, but its not loop, i mean after the animation "On" finishes, DX stucks because its the max-frame, and it has nothing to do, how will i make a LOOP on Decoration animations?

I've tried LoopAnimPivot but its for Pawn etc.. not for Decoration.


Any expert out there? :D


Thanks in advance!
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby ~DJ~ » Mon Apr 13, 09 7:21 am

Sorry for second post:


I've found out what is the function/command to loop-animation play at some Decoration.

its LoopAnim('AnimSequence');



Okay, the problem is solved, but it still makes DX stuck and plays the animation sequence loop, but in a strange way.... we are stuck though..



So can anyone test this mod for me and reply that its Vista's fault or its something else? please?

TestMod.rar


(Not recommended for people like HDD21, I've warned you. MAYBE THIS CAN CAUSE YOUR HARDDRIVE TO MELT.)


NO STEALING TOO! ARGH I'VE SPENT TIME ON THAT CELLING-FAN MESH AND TEXTURE!
Last edited by ~DJ~ on Mon Apr 13, 09 7:23 am, edited 1 time in total.
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby Allan » Mon Apr 13, 09 10:07 pm

You may need to slightly re-do the animation of the mesh - add a couple of frames with no movement at the end, just to be sure you're not making DX crash by attempting to load a non-existant frame.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Cozmo » Tue Apr 14, 09 1:03 am

Alternatively, you could just use rotation instead of a new animation and when frobbed, switch between 0 and whatever rotation speed :P

(Haven't tried, but I'm sure that'd work)
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby ~DJ~ » Tue Apr 14, 09 3:08 am

@Cozmo

I Know about the rotation, I don't want the WHOLE fan to rotate, just the wings and some motor (round thingy) and thats what is rotating in the animation.


@Allan


Maybe your right, I'll try it ASAP, thanks, I'll leave few fan stopped animation at the end. :D
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby clyzm » Tue Apr 14, 09 4:24 am

Which anim are you using for it? (All, Still, etc.)
Image
User avatar
clyzm
Forum Master God
 
Posts: 16023
Joined: Sun Nov 28, 04 2:48 am
Location: Chiraq

Postby ~DJ~ » Tue Apr 14, 09 10:33 am

All,Still,On


All is to 1-13 (DUH)
Still is to 0-2
On is to 2-13, 13 are MAXFRAMES.
Last edited by ~DJ~ on Tue Apr 14, 09 10:34 am, edited 1 time in total.
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby clyzm » Tue Apr 14, 09 9:36 pm

Try setting it to 1-12. Which modeling program are you using?
Image
User avatar
clyzm
Forum Master God
 
Posts: 16023
Joined: Sun Nov 28, 04 2:48 am
Location: Chiraq

Postby ~DJ~ » Wed Apr 15, 09 1:18 am

Milkshape3d.. btw this is not a one word post :)
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby ~DJ~ » Thu Apr 16, 09 9:15 am

Sorry for the second post, I can't edit anyway lol,


Anways, so yeah, can someone tell me whats this:


Critical: UMesh::GetFrame
Critical: (LodMesh testmod.Root)
Critical: URender::DrawLodMesh
Critical: (LodMesh testmod.Root)
Critical: DrawMesh
Critical: URender::DrawActorSprite
Critical: URender::DrawFrame
Log: Anomalous singularity in URender::DrawWorld



This is the log that shows up, and makes everything maaad.


Help please? :/
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby Allan » Thu Apr 16, 09 11:32 am

It's telling you you're trying to make a mesh draw something that isn't there.

This should be fixed by what I told you on MSN.


For those not on the MSN convo:

- STARTFRAME is the frame an animation starts at.
- NUMFRAMES is how many frames (including the start) the animation is. Not which frame it ends on.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby ~DJ~ » Thu Apr 16, 09 5:05 pm

Yes, Allan helped me!



I was wrong..

For example:

If my mesh has 60 maxframes, and I have some sequence last one only, for example "Attack" that starts from 30, ends in 44. and 16 frames are left empty.


So I should do it like-

STARTFRAME 30 NUMFRAMES 14


NOT

STARTFRAME 30 NUMFRAMES 60



Its like you gotta calculate about how much will make it 44, so 30+14 = 44, so NUMFRAMES must be the calculation.
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 17 guests
cron