Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 5:07 pm
All times are UTC + 0
SHP anim looping back
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [12 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Sep 12, 2018 3:02 pm    Post subject:  SHP anim looping back
Subject description: Frame X to Y then back to X
Reply with quote  Mark this post and the followings unread

I got my hands on MadHQ's depot, but I got a bit of trouble with the "repair arm working" bit.

I'd show, but the game bar, which worked so well in the past, now refuses to record (screenies still work tho) RA2.

In any case, whoever wrote on ModEnc that End is "the 0-based index of the last frame" didn't test it out himself.
The INI comments are correct: it's the number of frames til the last frame.

This creates a problem: how to make it so the game loops the SHP anim back?
Negative values do not work.

Code:
SpecialAnimTwo=YADEPOT_C2
SpecialAnimTwoDamaged=YADEPOT_C5
SpecialAnimTwoZAdjust=-70

[YADEPOT_C2]
Image=YADEPOT_C
Normalized=yes
Start=10
End=7
Rate=600
NewTheater=yes
Shadow=yes
Next=YADEPOT_C7

[YADEPOT_C7]
Image=YADEPOT_C
Normalized=yes
Start=17
End=-7
Rate=600
NewTheater=yes
Shadow=yes
Next=YADEPOT_C2

What I need is for the anim to loop from 10 til 17 and then back again to 10 in an infinite loop.



yadepot_c.shp
 Description:
MadHQ's depot

Download
 Filename:  yadepot_c.shp
 Filesize:  427.29 KB
 Downloaded:  6 Time(s)


Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Wed Sep 12, 2018 5:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

SHP builder->Edit->Mass Frame Operations->Reverse Frames

_________________

Back to top
View user's profile Send private message Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Sep 12, 2018 5:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

cxtian39 wrote:
SHP builder->Edit->Mass Frame Operations->Reverse Frames

Thanks, but I was talking about if someone knows an INI hack, not an SHP hack.

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Wed Sep 12, 2018 5:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:
[FRAME9]
Image=YourAnim
Start=9
End=10
Next=FRAME8
[FRAME8]
Image=YourAnim
Start=8
End=9
Next=FRAME7
[FRAME7]
...

_________________

Back to top
View user's profile Send private message Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Sep 12, 2018 5:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

You assume End is the frame number like on ModEnc.

I explicitly stated up there that is false.

Code:
SJM: End is not ending frame number but rather # of frames in this sequence

^^correct.
At least for RA2 and YR/Ares.

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Sep 12, 2018 6:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

Reverse=yes

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Wed Sep 12, 2018 6:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
You assume End is the frame number like on ModEnc.

I explicitly stated up there that is false.

Code:
SJM: End is not ending frame number but rather # of frames in this sequence

^^correct.
At least for RA2 and YR/Ares.

How could be
I'm done a lot of anim codes and didn't find this problem
(damaged anim usually doesn't start at 0)

_________________

Back to top
View user's profile Send private message Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Sep 12, 2018 6:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Reverse=yes

Starrku already suggested that, I beleive.

Doesn't work with Next= shenanigans.
cxtian39 wrote:
How could be
I'm done a lot of anim codes and didn't find this problem
(damaged anim usually doesn't start at 0)

Dunno, those are the test results.
That, and just by looking at the code you'd realize something is up.

Here:
Code:
; Repair bay arm retracting
[GADEPT_C] ;C3
Image=GADEPT_C
Normalized=yes
Start=0
End=10      ; SJM: End is not ending frame number but rather # of frames in this sequence -- ending frame # is 9
Rate=400
NewTheater=yes
Shadow=yes

; Repair bay arm retracting
[GADEPT_CD] ;C3
Image=GADEPT_C
Normalized=yes
Start=10
End=10      ; SJM: End is not ending frame number but rather # of frames in this sequence -- ending frame # is 19
Rate=400
NewTheater=yes
Shadow=yes

Each retraction anim is 10 frames only. Yet at the End for the damaged version, there's no 20, but 10.

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Wed Sep 12, 2018 7:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just look at my code again I never use End but LoopEnd #Tongue
It's breaking convention they mean differently, the coder should be fired #Tongue

_________________

Back to top
View user's profile Send private message Skype Account
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Wed Sep 12, 2018 7:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

You're all overcomplicating it, just use PingPong=yes.

EDIT: Nevermind, it's bugged for this specific use according to ModEnc, unless Ares fixes this bug.

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Thu Sep 13, 2018 4:53 am    Post subject: Reply with quote  Mark this post and the followings unread

4StarGeneral wrote:
You're all overcomplicating it, just use PingPong=yes.

EDIT: Nevermind, it's bugged for this specific use according to ModEnc, unless Ares fixes this bug.

I'll test it still. ModEnc is wrong about End, so it might be wrong there too.

That flag real tho?

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Thu Sep 13, 2018 8:26 am    Post subject: Reply with quote  Mark this post and the followings unread

It's real, but at least in TS it doesn't work well with damage anims (the animation becomes glitched when the building is repaired, IIRC).

_________________


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [12 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1811s ][ Queries: 13 (0.0098s) ][ Debug on ]