Effects and Anims

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
PvtParts
Jedi
Jedi
Posts: 1001
Joined: Mon Apr 03, 2006 9:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: plundering yer booty

Effects and Anims

Post by PvtParts »

Okay so I was moments away from zipping and submitting my naboo conquest map to filefront (I was in the middle of the final pre-package playtest/bug check/make-sure-nothing got screwed in the final clean/munge test) and as I was flying around I had the idea it would be a lot more neat if instead of just dogfighting there were landers coming in throughout the city - this is the beginning of the CIS invasion of naboo, so they wouldn't be short on resources quite yet.

So I've now got 3 out of 7 landers animated, to come in at various times during the battle and land in the city. So far so good.

However, the 3rd lander hits and 'knocks over' a building. As it is (the building can't break...) its not the most realistic animation, but it looks decent. All I need is some smoke and dust to be kicked up to cover the corny parts and it'll be fine.

So, to the point, does anyone know how the hell to tie a effect into an anim?

I've got a couple of ideas, but ill save those for worst case scenario, as they arent the most practical.
YankFan1950

RE: Effects and Anims

Post by YankFan1950 »

i am really not sure how but it might be in scripting or just not do it at all. I am pretty sure you need to tell the gameengine to play an effect at a certain time. But i have no clue how.
MasterSaitek009
Black Sun Slicer
Posts: 619
Joined: Wed Aug 23, 2006 4:10 pm

Post by MasterSaitek009 »

Here is one way that should work.
  • 1. Take a small object with a hard point and set it up with an ODF.

    2. Open the ODF and use the "attach effect to hardpoint" thing and attach the effects that you want.

    3. Place the object under the ground enough so that you cant see the effects.

    4. Animate the object in ZE so that it comes up out of the ground at the same time as the lander is coming down.

    5. Make the object slowly recede back under ground so that it looks like the dust and stuff are disappearing.
This might or might not be what you want. But it might do the trick. ;)

Good luck!
*****MasterSaitek009*****
PvtParts
Jedi
Jedi
Posts: 1001
Joined: Mon Apr 03, 2006 9:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: plundering yer booty

Post by PvtParts »

Thanks for the advice. I ended up doing sort of a mix of ya'lls suggestions.

I took the geo_prop_splash (which I have used in this same map to attach a fireworks effect), and attached the effect. In particle edit, I simply delayed the effect start to 111, which is about when the lander arrives (I hadnt though of this because I wasnt sure what the particle edit time units were, didnt think they would be approximately, or maybe exactly, in seconds). So the dust plays and such as everything is falling.

However, since the effect has a beginning and end, it replays. Now I could've probably killed the object in my lua, but instead i just used the pop anim so after a few seconds of dust and such, the splash moves instantaneously outside the boundary, underground, and then just incase I flipped it upside down (so if it did play if would go down and not up. Even though its far below the ground..)

Thanks guys. Map should be up on filefront soon im gonna submit it today if everything goes smooth. id appreciate any downloads like to know what everyone thinks
MasterSaitek009
Black Sun Slicer
Posts: 619
Joined: Wed Aug 23, 2006 4:10 pm

Post by MasterSaitek009 »

Glad we could help. :) Can't wait to play your map, it sounds fun.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Post by [RDH]Zerted »

I would say redo it in the Lua. Wouldn't moving it underground just add one more object for the game to keep track of, compared to killing it?
PvtParts
Jedi
Jedi
Posts: 1001
Joined: Mon Apr 03, 2006 9:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: plundering yer booty

Post by PvtParts »

so the object is named like lander_dust

what do I put in the lua to kill it after 112 seconds?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Post by [RDH]Zerted »

When you start the animation, start a timer that is slightly longer than the animation. When the timer elapses, stop the animation and kill the dust object. Check the scripting documentation, I think its KillObject().

I don't know if the short timer makes up for not having the object underground. Only a developer could tell you which one gives you better performance, even if it is just one object.
PvtParts
Jedi
Jedi
Posts: 1001
Joined: Mon Apr 03, 2006 9:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: plundering yer booty

Post by PvtParts »

Ill see. I might not want to mess with it anymore.

I wish I woke up one morning and could model and skin in XSI and could fluently work with lua.

Sadly in the real world it doesnt work that way.

I am going to buy some books about working with XSI and probably some coding stuff this summer so hopefully I can get a good understanding of it all.
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Post by Caleb1117 »

PvtParts wrote: I wish I woke up one morning and could model and skin in XSI and could fluently work with lua.

Sadly in the real world it doesnt work that way.
Offtopic: Yeah, like when I wish I had/could afford XSI Foundations.
but yeah, Life sucks like that.
Post Reply