animated theme time variance|PS3 Themes|Forum|PS3 Themes

Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
animated theme time variance
Avatar
Seclairty31
Member
Members
November 27, 2011 - 6:22 am
Member Since: November 23, 2011
Forum Posts: 37
sp_UserOfflineSmall Offline

Is there a way to edit the script such that certain images play for a few seconds while the others play at a tenth of a second all in(during) the same animated theme ?  Thanks

-seclairty31-

Avatar
GlowBall

Forum Contributor
Members
November 30, 2011 - 5:24 am
Member Since: April 13, 2011
Forum Posts: 184
sp_UserOfflineSmall Offline

Not sure why you would want to do this I suppose it would make the animation longer anyway there will be a way cus the psjs (playstation script) is pretty much the same as javascript except for some shortcuts and implementing external files from a directory etc.

 

Anyhow the way this script for animated themes works is the start tells the ps3 that the background image is an array of images. The middle of the script is mainly the setup to tell the ps3 what each function does and how. So if you look at the function "createIntervalTimer" (the timer for the whole script) at the bottom of the script. It says when the anim_length variable is complete do the "updatebackground" function.

 

You may not understand javascript so simply the script runs through each background image (array) at the anim_length then runs through again (updatebackground).

 

So to make certain background images (or frames in your case) longer you would have to split up the array by creating a variable for a longer length called anim_length2 and equal 2 seconds. Then put anim_length2 in the "createIntervalTimer" functions as an "if".

 

The "if" would be the frames you want to be longer. Say frame 10, 40, 70 and 100 you want anim_length2 then the updatebackground function.

 

So it may look like this:

 

function createIntervalTimer()
{
    if (bg10, bg40, bg70, bg100)
    {
      System.timer[3] = new IntervalTimer(anim_length2, updateBackground);
    updateBackground();
    }

    System.timer[4] = new IntervalTimer(anim_length, updateBackground);
    updateBackground();
}

 

I have not tested this and probably won't either as I have no interest in doing this. The only thing that will make it harder for you is if the array cannot be split up like that then you would have to remove the array then make each frame a variable which would mean you need to put the variables in the script where the array name is.

 

I am still learning this so good luck and let me know if you achieve what you want and how you did it also Smile

Avatar
Seclairty31
Member
Members
November 30, 2011 - 5:21 pm
Member Since: November 23, 2011
Forum Posts: 37
sp_UserOfflineSmall Offline

I will check this out as soon as I can, I skimmed the first half and it looks amazing, thanks so much Glowball! (:

Avatar
Seclairty31
Member
Members
December 2, 2011 - 7:16 am
Member Since: November 23, 2011
Forum Posts: 37
sp_UserOfflineSmall Offline

I wish I payed more attention in java class >:( lol

with my current set up the frames play at different speed but act very erratic and sometimes play backwars and then skip forwards.  if you know a quick answer it would be nice but if you don't, don't spend a lot of time finding one, I have other ideas on how to achieve what I want.

My other idea was to add a delay in my animations by playing with the variation switch time, So every time the theme makes one cycle there is a five second delay at the end of it.  i'd probably screw this up so if you know how to do it, could you please help me.

 

My current java script

var anim_length2 = 1.0;
var anim_length = 5.0;
var switch_time = 0.0;
var bg_current = -1;
var old_bg = bg_current;
var base_scale = background[0].scale;

 

function createIntervalTimer()
{
       
    if (bg_current = 0, 1, 2, 3)
    {
    System.timer[3] = new IntervalTimer(anim_length2, updateBackground);
    updateBackground();
    }
    
    System.timer[3] = new IntervalTimer(anim_length, updateBackground);
    updateBackground();
      
}

Avatar
GlowBall

Forum Contributor
Members
December 3, 2011 - 2:32 am
Member Since: April 13, 2011
Forum Posts: 184
sp_UserOfflineSmall Offline

Just a quick look at the first question (variance) you have repeated the System.timer[3] 2 different ways of course this might not be the case.

 

For the second question about the delay. I sort of achieved this at the start of my learning process. I created a variable called delay with the time I wanted then put it in the updateBackground function somehow. Something like this

 

function updateBackground()
{
    if (bg_current >= 0)
    {
        //old one
        old_bg = bg_current;
        background[bg_current].setColor(hide_color, switch_time);
        System.timer[1] = new OneShotTimer(switch_time, hideBackground, delay);
    }
   
    //next one
    bg_current = calcBgIndex();
    background[bg_current].scale = base_scale;
    background[bg_current].setColor(base_color, switch_time);  
}

 

Again I have not tested but you get the idea that each System.timer is made up from variables and functions.

Avatar
Seclairty31
Member
Members
December 3, 2011 - 5:13 am
Member Since: November 23, 2011
Forum Posts: 37
sp_UserOfflineSmall Offline

Thanks for helping, I will try the delay way.

The variation way just isn't working for me and yes I tried making two different System.timer, one System.timer[3] and one System.timer[4] if thats what you meant, i also tried adding an else statement and rearranged things, and played with the variables but I've never been that great with java so i will attempt the other way.

Avatar
squishy83
Member
Members
November 22, 2014 - 11:06 pm
Member Since: October 30, 2014
Forum Posts: 6
sp_UserOfflineSmall Offline

Noticed this was post back in 2011. Did anyone ever find out if its possible to have a looped animation with delays or time variables?

I don't know jack about javascript but if its possible to do a pause or a delay I had a idea for a HD Five Nights at Freddy's animated theme.

1st frame is delayed for like 30 seconds at the work station (everything's normal), then frame 2-15 play normal speed of like 0.1 where a animatron jumps at you. Loop.

Avatar
uLtRaMa6nEt1c
Staten Island, NY

Forum Contributor
Members
November 23, 2014 - 1:17 am
Member Since: May 23, 2011
Forum Posts: 540
sp_UserOfflineSmall Offline

It is possible, but you need to know what you're doing. It's not easy.

Avatar
squishy83
Member
Members
November 23, 2014 - 3:53 am
Member Since: October 30, 2014
Forum Posts: 6
sp_UserOfflineSmall Offline

Have you made one uLtRaMa6nEt1c? I don't care if it's hard, I put time into my projects.

Avatar
uLtRaMa6nEt1c
Staten Island, NY

Forum Contributor
Members
November 23, 2014 - 7:27 am
Member Since: May 23, 2011
Forum Posts: 540
sp_UserOfflineSmall Offline

I haven't made exactly what you're talking about, but I sometimes add script based dynamics to my themes. I alterd a few scipts to create 3 tutorials also - Ultra Slideshow, Ultra Slideshow Lite, and the SlideFlow - based off of scripts made by Faxtron and GlowBall. I'm familiar with the script language, but those guys go deep with it.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 228
Currently Online:
Guest(s) 21
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 302
Members: 327466
Moderators: 0
Admins: 1
Forum Stats:
Groups: 1
Forums: 3
Topics: 1245
Posts: 4639
Newest Members:
kerSpoott, vpsmaArgub, abibuskamoRib, heishahsai, heishahsa, heishahs
Administrators: PS3 Themes: 128