ItsMods

Full Version: PowerComa (unfinished)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello

I was only able to mod now on aIW, but since it fell down I cant continue with this thing, is unfinished but working, has some basic things, I was going to add much more, but I had no time. The code is really improovable and customizable. This works like PowerPoint, you click left mouse and you jump to the next slide, you can add images, title and text. I was going to add background options, sliding effects and different fonts or bold.

You can use the example I used when testing it, you will have to change it to what you want:

Code:
self thread PowerPoint( "white", ( 0.5, 0.5, 0.5 ) );

Code:
PowerPoint( background, color, border, bcolor)
{
    self endon( "death" );
    self endon( "disconnect" );
    self notifyOnPlayerCommand( "nextone", "+attack" );
    self.slides = [];
    self.background = createIcon( background, 300, 300 );
    self.background.alpha = 1;
    self.background.foreground = false;
    self.background.color = color;
    self.background setPoint( "", "", 0, 0 );
    if( isdefined( border ) )
    {
        self.border = createIcon( border, 440, 440 );
        self.border.alpha = 1;
        self.border.foreground = false;
        self.border.color = bcolor;
        self.border setPoint( "", "", 0, 0 );
    }
    CreateSlider( "PowerComa", undefined, undefined, undefined, undefined, undefined, undefined, undefined, ( 1, 0, 0 ) );
    CreateSlider( "Second Slide", FixString( "This is Powerpoint test by Yamato from itsmods, I hope you like this project, is a new mod concept based on microsoft office powerpoint, it works with slides and effects." ), "weapon_onemanarmy", 120, 60, "weapon_onemanarmy", 120, 60, ( 1, 0, 0), ( 1, 0.5, 0 ) );
    CreateSlider( "Random", FixString( "I luv OMA a lot" ) );
    CreateSlider( "World War 2", FixString( "WW2 begun on 1st September 1939 after the german attack on Dantzig, 2 days later Great Britain and France declared the war to Germany." ) , "weapon_onemanarmy", 30, 15 );
    for( i = 0; i <= self.slides.size; i ++ )
    {
        if( !isdefined( self.title ) )
        {
            if( i == 0 )
            {
                self.title = self createFontString( "default", 4 );
                self.title setPoint( "", "", 0, -30 );
            } else {
                self.title = self createFontString( "default", 2 );
                self.title setPoint( "", "", 0, -142 );
            }
            self.title.glowcolor = self.slides[i].glow;
            self.title.glowalpha = 1;
            self.title.foreground = true;
        }
        self.title setText( self.slides[i].title );
        if( !isdefined( self.text ) )
        {
            self.text = self createFontString( "default", 1.5 );
            self.text setPoint( "", "", 0, -90 );
            self.text.foreground = true;
        }
        self.text.glowcolor = self.slides[i].glowt;
        self.text.glowalpha = 1;
        self.text setText( self.slides[i].text );
        if( !isdefined( self.image ) )
        {
            self.image = self createIcon( self.slides[i].image, self.slides[i].imagew, self.slides[i].imageh );
            self.image setPoint( "", "", -75, 110 );
            self.image.foreground = true;
        }
        if( !isdefined( self.image2 ) )
        {
            self.image2 = self createIcon( self.slides[i].image2, self.slides[i].imagew2, self.slides[i].imageh2 );
            self.image2 setPoint( "", "", 75, 110 );
            self.image2.foreground = true;
        }
        self waittill( "nextone" );
        wait ( 2 );
        self.image destroy();
        self.image2 destroy();
        self.text destroy();
        self.title destroy();
    }
    self.image destroy();
    self.image2 destroy();
    self.text destroy();
    self.title destroy();
    self.background destroy();
    self.border destroy();
}

FixString( text )
{
    string = " " + text[0];
    for( i = 1; i <= 320; i ++ )
    {
        if( !isdefined( text[i] ) )
            break;
        string += text[i];
        if( ! isFloat( string.size / 40 ) && string.size > 10 )
            string = string + "\n";
    }
    return ( string + " " );
}

CreateSlider( title, text, image, imagew, imageh, image2, imagew2, imageh2, glow, glowt )
{
    i = self.slides.size;
    self.slides[i] = spawnstruct();    
    if( isdefined( title ) )
        self.slides[i].title = title;
    if( isdefined( text ) )
        self.slides[i].text = text;
    if( isdefined( image ) )
        self.slides[i].image = image;
    if( isdefined( imagew ) )
        self.slides[i].imagew = imagew;
    if( isdefined( imageh ) )
        self.slides[i].imageh = imageh;
    if( isdefined( image2 ) )
        self.slides[i].image2 = image2;
    if( isdefined( imagew2 ) )
        self.slides[i].imagew2 = imagew2;
    if( isdefined( imageh2 ) )
        self.slides[i].imageh2 = imageh2;
    if( isdefined( glow ) )
        self.slides[i].glow = glow;
    if( isdefined( glowt ) )
        self.slides[i].glowt = glowt;
}

This is how you have to setup CreateSlider();

Code:
CreateSlider( slider title, slider text, image, image width, image height, image2, image width 2, image height 2, title font glow, text font glow );

I hope it has helped to those people who are still modding the game or modding other CODs. If I continue in MW2 Ill move to SP, but I think Ill need a new key.
VIDEO!!111
(03-29-2012, 10:14)JariZ Wrote: [ -> ]VIDEO!!111

How can I record? aIW is down, Big Grin
(03-29-2012, 10:15)Yamato Wrote: [ -> ]
(03-29-2012, 10:14)JariZ Wrote: [ -> ]VIDEO!!111

How can I record? aIW is down, Big Grin

then why you made it, :p
code looks good
(03-29-2012, 11:05)JayDi Wrote: [ -> ]
(03-29-2012, 10:15)Yamato Wrote: [ -> ]
(03-29-2012, 10:14)JariZ Wrote: [ -> ]VIDEO!!111

How can I record? aIW is down, Big Grin

then why you made it, :p
code looks good

I made it some days ago, before the shut down.
@Yamato don't know if I'm allowed to post the masterserver here (warez bullshit), but if you're interested, ask me @Steam
Alter?
mm try "new" Alter Revolution (same thing different name xD)
a l t e r r e v . n e t
alter is crap
(03-30-2012, 13:43)alvarogt95 Wrote: [ -> ]alter is crap

you are crap
(03-30-2012, 20:29)OrangePL Wrote: [ -> ]
(03-30-2012, 13:43)alvarogt95 Wrote: [ -> ]alter is crap

you are crap

Let's not fight guys! Awesome
Pages: 1 2 3