Author |
Message |
SnowMonster20
Joined: Wed Jul 16, 2008 12:49 am Posts: 226
|
SpriteAnimMode. help
How would I get it so that when you "charge" a weapon it only plays the animation once?
The gun has 4 frames but when i hold down fire it acts like a minigun. It starts slow then speeds up and loops till it fires or i let go. I have messed around with the timing but It doesn't seem to help much. even if it starts slower it either fires before the animation is complete or loops it fast anyway.
An example would be a bow and drawback animation for it. Currently it draws back then up then back then up rapidly till it fires. Which just looks silly.
How would I get it to just draw back, fire, then twang forward.
I have got it to fire and twang. Its the drawback giving me issues.
|
Fri Sep 02, 2011 5:36 pm |
|
|
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
Re: SpriteAnimMode. help
try taking a look at how its done with the Gatling gun I had just woken up (night shift) , i miss read your post
Last edited by salt_1219 on Sat Sep 03, 2011 12:28 am, edited 1 time in total.
|
Fri Sep 02, 2011 7:06 pm |
|
|
Miggles
Data Realms Elite
Joined: Mon Jul 12, 2010 5:39 am Posts: 4558
|
Re: SpriteAnimMode. help
He has the animation done, he just wants it to be used once. So when you charge up the weapon, it stops animation at full charge. Did you even read the OP?
|
Fri Sep 02, 2011 8:21 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: SpriteAnimMode. help
You are not helping much either, Miggles.
Anyway so, I don't remember from where I got this but it's for the SpriteAnimMode or whatever it's called variable:
0 = NOANIM 1 = ALWAYSLOOP 2 = ALWAYSRANDOM 3 = ALWAYSPINGPONG 4 = LOOPWHENMOVING 5 = LOOPWHENOPENCLOSE 6 = PINGPONGOPENCLOSE
But from what I understand, no one can do what you want to do, so you will probably have to add some lua to it.
|
Fri Sep 02, 2011 8:38 pm |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
Re: SpriteAnimMode. help
No that's for Lua.
|
Fri Sep 02, 2011 8:56 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: SpriteAnimMode. help
What thing is for lua?
|
Fri Sep 02, 2011 8:58 pm |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
Re: SpriteAnimMode. help
0 = NOANIM 1 = ALWAYSLOOP 2 = ALWAYSRANDOM 3 = ALWAYSPINGPONG 4 = LOOPWHENMOVING 5 = LOOPWHENOPENCLOSE 6 = PINGPONGOPENCLOSE
|
Fri Sep 02, 2011 9:14 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: SpriteAnimMode. help
Ahh...
So, this can't be done through ini?
|
Fri Sep 02, 2011 9:18 pm |
|
|
SnowMonster20
Joined: Wed Jul 16, 2008 12:49 am Posts: 226
|
Re: SpriteAnimMode. help
So how would I do it from lua? And what does ping pong mean?
In those variables I mean
|
Fri Sep 02, 2011 10:50 pm |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
Re: SpriteAnimMode. help
Lizardheim wrote: 0 = NOANIM 1 = ALWAYSLOOP 2 = ALWAYSRANDOM 3 = ALWAYSPINGPONG 4 = LOOPWHENMOVING 5 = LOOPWHENOPENCLOSE 6 = PINGPONGOPENCLOSE Those can also be accessed through .ini for some things, though. See: base.rte brain case and door engines. Or does .ini's SpriteAnimMode use a different set of modes? Ping pong is when it goes from start, to finish, cycles in reverse back to start, and repeats. Imagine the ball in a game of ping pong, and the positions where it hits the paddles are the first and last of the frames.
|
Fri Sep 02, 2011 10:59 pm |
|
|
SnowMonster20
Joined: Wed Jul 16, 2008 12:49 am Posts: 226
|
Re: SpriteAnimMode. help
Ah i see,
So what Im getting is that it is impossible for me to make it look nice even with lua or a workaround?
Guess ill just mess with the timing till it looks ok most of the time or I'll say it is like a super soaker and you have to pump it to shoot lol
|
Fri Sep 02, 2011 11:05 pm |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
Re: SpriteAnimMode. help
Well, last I knew, and this was in B24, mind you, devices held by actors had their frame determined through hard coding, and if you changed it through Lua, it would instantly be reverted to the hard coded value. (which was determined by your .ini settings, by default, frame 0 was idle, and frame 1 was the frame when you just fired.)
Because held devices and attachables have been made so much more accessible through Lua in b25-1, though, I would not be surprised if this had been made more accessible too.
|
Fri Sep 02, 2011 11:08 pm |
|
|
SnowMonster20
Joined: Wed Jul 16, 2008 12:49 am Posts: 226
|
Re: SpriteAnimMode. help
I don't know how to lua though lol.
I could post the weapon though if someone want to take a look at it
|
Fri Sep 02, 2011 11:11 pm |
|
|
Gotcha!
Joined: Tue Apr 01, 2008 4:49 pm Posts: 1972 Location: The Netherlands
|
Re: SpriteAnimMode. help
I'd post it. I am sure a lua god can help out. This forum seems to have many of them.
|
Fri Sep 02, 2011 11:21 pm |
|
|
salt_1219
Joined: Tue Jan 12, 2010 8:25 pm Posts: 400 Location: mukilteo, wa
|
Re: SpriteAnimMode. help
if you do get this to work let me know, I had a werewolf that i wanted to transform from human to wolf but the animation kept looping.
|
Sat Sep 03, 2011 8:45 am |
|
|
|