Old 21st March 2003, 17:40   #361
QuadHeliX
Major Dude
 
QuadHeliX's Avatar
 
Join Date: Jan 2003
Location: Washington State
Posts: 1,133
help

OK GUYs I got alot of the Dominator Coded (buttons and whatnot). I need to know the best way to Code the Guns. The Buttons at the bottom of the skin opens the sliding guns. I want the guns to slide out at the same time. I have the chainguns made with 2 animations.
I will overlay the animations on top of the sliding turrets. So the actual animations will move with the turret structure.(is this possible? or do you guys know a better way?) What is also the best way to make the animation smooth. Lets say a song has just started and is not very loud, I want the guns to just spin and not shoot till the noise and beats get loud. Any coding advice and know-how would be appreciated, and will probably be used in the skin.
Attached Images
File Type: jpg domin.jpg (74.3 KB, 612 views)
QuadHeliX is offline   Reply With Quote
Old 21st March 2003, 17:43   #362
QuadHeliX
Major Dude
 
QuadHeliX's Avatar
 
Join Date: Jan 2003
Location: Washington State
Posts: 1,133
animations

Attached Images
File Type: gif gun1.gif (13.9 KB, 642 views)
QuadHeliX is offline   Reply With Quote
Old 22nd March 2003, 09:52   #363
whatsitsname
Senior Member
 
whatsitsname's Avatar
 
Join Date: Nov 2002
Location: astralia
Posts: 386
Well i've finally managed to make a MAKI scripts that works on my own.Its my best attempt to make popup menus easy and i made it using
one of Frissbemonkeys scripts as a reference.
Attached Files
File Type: m popup.m (1.8 KB, 596 views)
whatsitsname is offline   Reply With Quote
Old 22nd March 2003, 10:16   #364
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
I have made an update of frisbeemonkey's drawer script- this time it remembers whether the drawer was out or in last time.
Attached Files
File Type: zip drawer.zip (2.6 KB, 561 views)
hammerhead is offline   Reply With Quote
Old 22nd March 2003, 17:07   #365
iPlayTheSpoons
Major Dude
 
iPlayTheSpoons's Avatar
 
Join Date: Aug 2001
Location: SJSU
Posts: 1,030
Send a message via AIM to iPlayTheSpoons
Quote:
Originally posted by hammerhead
I have made an update of frisbeemonkey's drawer script- this time it remembers whether the drawer was out or in last time.
whered you learn that
iPlayTheSpoons is offline   Reply With Quote
Old 22nd March 2003, 17:47   #366
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Not your script
Actually, rpeterclark taught me.
hammerhead is offline   Reply With Quote
Old 22nd March 2003, 20:39   #367
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Quad,
What I would do is keep everything separate. Have the spinning guns be one animation, so that once the music starts, you just have that spinning. Then, when the volume is above a certain level, you could show different frames of the firing animation. Oh, and to have them all slide out at the same time, just make sure they're in whatever groups you move.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 26th March 2003, 08:14   #368
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
ok
this is my first try at scripting so its prolly not n e good. i was trying to compile this file to maki but i can't get it to work. n e help? script is below and i will attach the .m

code:
//----------------------------------------------------------------------------------------------------------------
// My crumby attemp at display changing
//----------------------------------------------------------------------------------------------------------------
#include "../../../lib/std.mi"

Function CycleDisplayModeInstant();

Global Group Grp1, Grp2, Grp3;
Global Button ChngLytGrp;

Global Int DisplayMode; //0=EQ, 1=TH, 2=VIS, 3=VT
Global Int SlideMode; //0=Instant, 1=Slide

System.onScriptLoaded() {
Group pcGroup = getContainer("main").getLayout("Orb").findObject("Layout Groups");

Grp1 = pcGroup.findObject("C-Buttons");
Grp2 = pcGroup.findObject("Play Button");
Grp3 = pcGroup.findObject("Custom Vis");
ChngLytGrp = pcGroup.findObject("layout.change");
}

CycleDisplayModeSlide() { //eq th vis
if (DisplayMode == 0) {
Grp1.show();
Grp1.setXMLParam("y","-50");
Grp1.setTargetY(3);
Grp1.setTargetSpeed(0.75);
Grp2.setTargetY(55);
Grp2.setTargetSpeed(0.75);
Grp1.gotoTarget();
Grp2.gotoTarget();
DisplayMode = 1;
} else if (DisplayMode == 1) {
Grp3.show();
Grp3.setXMLParam("y","-50");
Grp3.setTargetY(3);
Grp3.setTargetSpeed(0.75);
Grp1.setTargetY(55);
Grp1.setTargetSpeed(0.75);
Grp3.gotoTarget();
Grp1.gotoTarget();
DisplayMode = 2;
} else {
Grp2.show();
Grp2.setXMLParam("y","-50");
Grp2.setTargetY(3);
Grp2.setTargetSpeed(0.75);
Grp2.gotoTarget();
DisplayMode = 0;
}
}

Grp2.onTargetReached() {
if (DisplayMode != 0) {
Grp2.hide();
Grp2.setXMLParam("y","3");
}
}

Grp1.onTargetReached() {
if (DisplayMode != 1) {
Grp1.hide();
Grp1.setXMLParam("y","3");
}
}

Grp3.onTargetReached() {
if (DisplayMode != 2) {
Grp3.hide();
Grp3.setXMLParam("y","3");
}
}



ChngLytGrp.onLeftButtonUp(int x, int y) {
if (InstantMode) {
CycleDisplayModeInstant();
}
}

Attached Files
File Type: m layout.m (1.9 KB, 518 views)

matt_69 is offline   Reply With Quote
Old 27th March 2003, 15:37   #369
Digitalhigh
Senior Member
 
Digitalhigh's Avatar
 
Join Date: Aug 2002
Location: hell
Posts: 232
Okay, problem 1: Looks like you forgot to define what "Layout Groups" actually is. You've got pcGroup=getcontainer.getlayout.findobject("Layout Groups"), but pcGroup not in the Global Group Group1, group2... area at all.

Second, I'm not 100%, but pretty sure that in order for .settarget... and .gototarget() to work, you have to do it for one GUIobject at a time. Instead of:

G1.settargetblah();
G2.settargetblah();
G1.gototarget();
G2.gototarget();

It'd be:

G1.settargetblah();
G1.gototarget();
G2.settargetblah();
G2.gototarget();

If I'm wrong about this, somebody correct me.

And lastly, there's two problems with the following line:

ChngLytGrp.onLeftButtonUp(int x, int y) {
if (InstantMode) {
CycleDisplayModeInstant();
}
}

The first is, there is No InstantMode. You've got it defined as Slidemode, and as an Int at that. For the syntax to be proper, I'd recommend changing Slidemode to a boolean, which is what I did in the attached script.

Oh, and your custom function CycleDisplayModeInstant() is called CycleDisplayModeSlide() in the actual function. Looks like you got the int and function names scrambled.

The attached script compiled fine, you've just gotta make sure all your XML stuff is named the same now, and it should work for ya. Good luck.

Edit: And if you've already attached the script, it's kind of redundant to paste the entire thing into the message as well.
Attached Files
File Type: m layout.m (1.9 KB, 538 views)
Digitalhigh is offline   Reply With Quote
Old 29th March 2003, 08:18   #370
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
sorry jimmy
it compiled but it didn't work. i can't b bothered finding out whats wrong right now. what im looking for now is how to get an animation to play at the skin start up and then disappear whens its done. how can this be done?

m*69

matt_69 is offline   Reply With Quote
Old 29th March 2003, 08:25   #371
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Look at (I think) page 3 of this thread.
hammerhead is offline   Reply With Quote
Old 29th March 2003, 08:35   #372
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
nope
wasn't on page 3. what am i exactly looking for in the thread?

m*69

matt_69 is offline   Reply With Quote
Old 29th March 2003, 08:57   #373
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Quote:
Originally posted by DirtyLowMoFo
Wildcore

if your animation only has to play on start up, you dont need a script, just put this in your xml:-

____________________________________________________________

<animatedLayer
id="startanim"
x="120" y="60"
w="157" h="put the frame height here"
image="startanim"
autoplay="1"
autoreplay="0"
speed="50"
ghost="1"
/>
________________________________________________________________

the animation will need a blank frame on the end of it(to be transparent) & if it needs to play continuously change the autoreplay value to 1.

hope this helps
it was p2 I think.
hammerhead is offline   Reply With Quote
Old 29th March 2003, 09:36   #374
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
thanx very much hh
that helps heaps. but i still got a problem - where i want to put it ive got other stuff. i want the anim to play dissapear then the main tickers/timer to come up after it has finished. pretty sure that would need a script. if u got n e ideas plz post back.

m*69

matt_69 is offline   Reply With Quote
Old 29th March 2003, 09:55   #375
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
ok, I'll write a script for that.
hammerhead is offline   Reply With Quote
Old 29th March 2003, 10:06   #376
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
oo
thanx so much hammer. i would do it if i knew maki hehe. ull get credits in the skin for this.

m*69

matt_69 is offline   Reply With Quote
Old 29th March 2003, 10:22   #377
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
this should work for ya
code:
#include "../../../lib/std.mi"

Global Group Contentgroup;
Global Animatedlayer anilayerPlayOnStart;
Global Int intFrames;

system.onScriptLoaded(){
Contentgroup = system.getScriptGroup().getObject("ContentGroup");
anilayerPlayOnStart = system.getScriptGroup().getObject("Anilayer");
intFrames = anilayerPlayOnStart.getLength();
anilayerPlayOnStart.play();
}

anilayerPlayOnStart.onFrame(int intFrames){
anilayerPlayOnStart.hide();
Contentgroup.show();
}



If you can't work out how to use it, send me your skin and I'll do it for you.
hammerhead is offline   Reply With Quote
Old 29th March 2003, 10:29   #378
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
thanx heaps hh
i should b able to work it out. i understand maki but i can't write it hehe. ill post back if i have n e problems.

m*69
p.s thanx for the speedy reply

matt_69 is offline   Reply With Quote
Old 29th March 2003, 11:04   #379
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
it won't compile. me or the script?

m*69

matt_69 is offline   Reply With Quote
Old 29th March 2003, 12:15   #380
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Its you. Check you have std.mi in the right place, and you are using b488.
hammerhead is offline   Reply With Quote
Old 29th March 2003, 14:24   #381
QuadHeliX
Major Dude
 
QuadHeliX's Avatar
 
Join Date: Jan 2003
Location: Washington State
Posts: 1,133
Guys can you think of anything that has not been done in a Winamp that is in Maki, That would be really cool in a A new winamp player. What are the limits of Maki?
QuadHeliX is offline   Reply With Quote
Old 29th March 2003, 21:07   #382
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
hammer
i figured it out. when i added a thing at the start tellin me what the script was about i only used / instead of //. im pretty stupid hehe

m*69

matt_69 is offline   Reply With Quote
Old 29th March 2003, 21:33   #383
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
workin properly?
hammerhead is offline   Reply With Quote
Old 29th March 2003, 21:50   #384
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
yeah
but im gettin a script error once ive added it to the xml. n e ideas?

m*69

matt_69 is offline   Reply With Quote
Old 29th March 2003, 21:55   #385
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
the group contentgroup must be a group within the group you are using the script in. check?
hammerhead is offline   Reply With Quote
Old 29th March 2003, 22:25   #386
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
is there any way i can make an animation from different files. like ive got 58 frames on an animation that ive saved each frame individually. is there any way that i can call each file and put it into a frame so that it plays them all?

matt_69 is offline   Reply With Quote
Old 30th March 2003, 17:01   #387
rpeterclark
Major Dude
(Reviewer)
 
rpeterclark's Avatar
 
Join Date: Aug 2002
Location: South Florida
Posts: 1,388
Quote:
Originally posted by matt_69
is there any way i can make an animation from different files. like ive got 58 frames on an animation that ive saved each frame individually. is there any way that i can call each file and put it into a frame so that it plays them all?
I recently read of a method to do that strictly through XML, but have not tried it myself and do not know if it is supported in all builds. You can read about it here:

http://canada.landoleet.org/docs/pub...eference_layer

There's an example of how it works. It seems much more complex than the frame strip method, so you may want to save yourself some headache and just put the frames together into 1 graphic.

You could also animate individual frame graphics via MAKI, but once again that just seems like more work than necessary.
rpeterclark is offline   Reply With Quote
Old 30th March 2003, 17:52   #388
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Why not just cut down on frames? anyway, 58 frames of about 200x200 would make a huge skin size.
hammerhead is offline   Reply With Quote
Old 31st March 2003, 08:55   #389
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
i went with rpeters suggestion with one big file. the anim is only small about 50x50 and its now 60+ frames but wil size is fairly small only about 600kb so im happy. damn thing took half an hour to put together but n e ways its done.

m*69

matt_69 is offline   Reply With Quote
Old 1st April 2003, 06:02   #390
whatsitsname
Senior Member
 
whatsitsname's Avatar
 
Join Date: Nov 2002
Location: astralia
Posts: 386
could someone look at my MAKI script cause it compiles ok but when i use the config nothing happens.If you want to lok at my xml please ask.
thnx
Attached Files
File Type: m config.m (4.1 KB, 571 views)
whatsitsname is offline   Reply With Quote
Old 15th April 2003, 05:36   #391
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
hey
ive got a script that i made but it won't compile properly. im thinking that it might be the if statements but i not sure. u can have a look at the .m . its attached at the bottom

thanx
Attached Files
File Type: m display.m (1.9 KB, 544 views)

matt_69 is offline   Reply With Quote
Old 15th April 2003, 05:43   #392
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Yeah... I'm thinking it might be the if statements too... You might want to have conditions for them. Do you want those things to always happen when the button is pushed? If so, just take out the ifs altogether. Otherwise, you need to decide the conditions that well let the events happen.
code:

if (someVariable == someValue) {
//do stuff
}


~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 15th April 2003, 05:47   #393
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
all i want to happen is when u click the button it shows the group. im pretty sure that if i took out the ifs it would work.

ill take em out and try it

m*69

matt_69 is offline   Reply With Quote
Old 15th April 2003, 05:52   #394
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
woohoo
it compiles without the ifs

thanx for help frisbee

m*69

matt_69 is offline   Reply With Quote
Old 15th April 2003, 06:22   #395
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
ok
the script works bar one thing. at the script start up i want only the tickers/timers group to show but for the script to work u need them to b loaded in player-normal which then shows them all. is there sumthin that i can add to my script to hide all the other groups at the skin startup so that its onlt the tickers/timer group showing?

m*69

matt_69 is offline   Reply With Quote
Old 15th April 2003, 06:41   #396
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
In onScriptLoaded(), just hide() the Groups that you don't want to be showing. Make sure you do that after you get your Objects and you're set.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 15th April 2003, 07:26   #397
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
thanx frisbee

i was wondering how to get the groups to fade in fade out. i was thinkin that u add an animation for the first bit, then hide and show groups then play the other half of the animation. or is there a better way to do it?

m*69

matt_69 is offline   Reply With Quote
Old 15th April 2003, 19:30   #398
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
What I usually do is just reuse the image I used for the Display's background over top of everything else. Set it's alpha to 0 at first, but whenever you switch screens, fade it in to 255, then hide the current group and show the new one, then fade back to 0.
Hope this helps,
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 16th April 2003, 05:56   #399
matt_69
Sunshine
(Major Dude)
 
matt_69's Avatar
 
Join Date: Jan 2003
Location: Brisvegas, Australia
Posts: 1,248
how do u do that frisbee?

m*69

matt_69 is offline   Reply With Quote
Old 16th April 2003, 06:52   #400
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Well, it's kind of complicated to explain. Basically, you'd need a variable to keep track of which mode you are in, then when they push a button setTargetAlpha(255) and gotoTarget() with your cover layer, when it reaches its target, switch to the new mode(show one group, hide the rest), then setTargetAlpha(0) and gotoTarget again to show the new display mode. For an example, look at Dominator, specifically display.m. There is a lot more going on in that script, but you might be able to get what you need out of it.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump