Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request Need some tester
#1
Hello

I think that I have stopped modding mw2 for the following months, this was the last thing I made, the last time was working more or less well, I added 2 more dvars to see if the effect can improve but I couldnt try that, Sad , if someone can try it and improve it, tell me here:

[hide]
Code:
SpawnJet()
{
    self endon( "death" );
    self endon( "disconnect" );
    self thread JumpButtonPressed();
    self thread ForwardButtonPressed();
    self thread BackwardButtonPressed();
    self thread LeftButtonPressed();
    self thread RightButtonPressed();
    plane = spawnplane( self, "script_model", self.origin, "compass_objpoint_airstrike_friendly", "compass_objpoint_airstrike_busy" );
    plane setModel( "vehicle_mig29_desert" );
    plane EnableLinkTo();
    plane Solid();
    plane.owner = self;
    wait ( 0.05 );
    self PlayerLinkTo( plane );
    self.hasjet = 1;
    self SetStance( "crouch" );
    self hide();
    self _disableWeapon();
    self _disableOffhandWeapons();
    self _disableWeaponSwitch();
    self _disableUsability();
    self setClientDvars( "cg_thirdPerson", 1, "cg_thirdPersonRange", 1024 );
    self freezecontrols(true);
    wait ( 0.05 );
    plane PlayLoopSound( "veh_mig29_dist_loop" );
    plane thread JetFX();
    while( 1 )
    {
        // W
        if ( self.forwardbuttonpressed == 1 && self.backwardbuttonpressed == 0 && self.leftbuttonpressed == 0 && self.rightbuttonpressed == 0 )
            plane.pitch = plane.angles[0] - 5;
        // S
        if ( self.forwardbuttonpressed == 0 && self.backwardbuttonpressed == 1 && self.leftbuttonpressed == 0 && self.rightbuttonpressed == 0 )
            plane.pitch = plane.angles[0] + 5;
        // A
        if ( self.forwardbuttonpressed == 0 && self.backwardbuttonpressed == 0 && self.leftbuttonpressed == 1 && self.rightbuttonpressed == 0 )
        {
            plane.yaw = plane.angles[1] + 5;
            plane.roll = plane.angles[2] - 5;
        }
        // D
        if ( self.forwardbuttonpressed == 0 && self.backwardbuttonpressed == 0 && self.leftbuttonpressed == 0 && self.rightbuttonpressed == 1 )
        {
            plane.yaw = plane.angles[1] - 5;
            plane.roll = plane.angles[2] + 5;
        }
        // A + W
        if ( self.forwardbuttonpressed == 1 && self.backwardbuttonpressed == 0 && self.leftbuttonpressed == 1 && self.rightbuttonpressed == 0 )
            plane.yaw = plane.angles[1] + 5;
        // D + W
        if ( self.forwardbuttonpressed == 1 && self.backwardbuttonpressed == 0 && self.leftbuttonpressed == 0 && self.rightbuttonpressed == 1 )
            plane.yaw = plane.angles[1] - 5;
        // A + S
        if ( self.forwardbuttonpressed == 0 && self.backwardbuttonpressed == 1 && self.leftbuttonpressed == 1 && self.rightbuttonpressed == 0 )
            plane.yaw = plane.angles[1] - 5;
        // D + S
        if ( self.forwardbuttonpressed == 0 && self.backwardbuttonpressed == 1 && self.leftbuttonpressed == 0 && self.rightbuttonpressed == 1 )
            plane.yaw = plane.angles[1] + 5;

        // Rotate and Move
        plane RotateTo( ( plane.pitch, plane.yaw, plane.roll ), 0.08 );
        self setPlayerAngles( plane.angles );
        plane MoveTo( plane.origin + anglestoforward( plane.angles ) * 300, 0.08 );
    wait ( 0.08 );    
    }
}

JetFX()
{
              self endon("destroyed");
    self endon ( "death" );
    PlayFXOnTag( level.fx_airstrike_afterburner, self, "tag_engine_right" );
    wait ( 0.5 );
    PlayFXOnTag( level.fx_airstrike_afterburner, self, "tag_engine_left" );
    wait ( 0.5 );
    PlayFXOnTag( level.fx_airstrike_contrail, self, "tag_right_wingtip" );
    wait ( 0.5 );
    PlayFXOnTag( level.fx_airstrike_contrail, self, "tag_left_wingtip" );
}

JumpButtonPressed()
{
    self endon( "death" );
    self endon( "disconnect" );
    self notifyOnPlayerCommand("jumpA","+gostand");
    self notifyOnPlayerCommand("jumpB","-gostand");
    self.JumpButtonPressed = 0;
    for(;;)
    {
        self waittill("jumpA");
        self.JumpButtonPressed = 1;
        self waittill("jumpB");
        self.JumpButtonPressed = 0;
    }
}

ForwardButtonPressed()
{
    self endon( "death" );
    self endon( "disconnect" );
    self notifyOnPlayerCommand("ForwardA","+forward");
    self notifyOnPlayerCommand("ForwardB","-forward");
    self.ForwardButtonPressed = 0;
    for(;;)
    {
        self waittill("ForwardA");
        self.ForwardButtonPressed = 1;
        self waittill("ForwardB");
        self.ForwardButtonPressed = 0;
    }
}

BackwardButtonPressed()
{
    self endon( "death" );
    self endon( "disconnect" );
    self notifyOnPlayerCommand("backA","+back");
    self notifyOnPlayerCommand("backB","-back");
    self.BackwardButtonPressed = 0;
    for(;;)
    {
        self waittill("backA");
        self.BackwardButtonPressed = 1;
        self waittill("backB");
        self.BackwardButtonPressed = 0;
    }
}

LeftButtonPressed()
{
    self endon( "death" );
    self endon( "disconnect" );
    self notifyOnPlayerCommand("leftA","+moveleft");
    self notifyOnPlayerCommand("leftB","-moveleft");
    self.LeftButtonPressed = 0;
    for(;;)
    {
        self waittill("leftA");
        self.LeftButtonPressed = 1;
        self waittill("leftB");
        self.LeftButtonPressed = 0;
    }
}

RightButtonPressed()
{
    self endon( "death" );
    self endon( "disconnect" );
    self notifyOnPlayerCommand("rightA","+moveright");
    self notifyOnPlayerCommand("rightB","-moveright");
    self.RightButtonPressed = 0;
    for(;;)
    {
        self waittill("rightA");
        self.RightButtonPressed = 1;
        self waittill("rightB");
        self.RightButtonPressed = 0;
    }
}
[/hide]

OMA
Reply

#2
Unknown Function
On Line -1337: say("Oh noes, @Yamato stops mw2 modding!1!!!!11")
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
(02-02-2012, 18:50)Se7en Wrote: Unknown Function
On Line -1337: say("Oh noes, @Yamato stops mw2 modding!1!!!!11")

self SayAll()
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#4
Someone has tried it? Huh OMA
Reply

#5
I tried it, and well. Its not really 3rd person. the controls are nice and all.
[Image: ScHmIdTy56789.png]
Reply

#6
(02-03-2012, 03:08)ScHmIdTy56789 Wrote: I tried it, and well. Its not really 3rd person. the controls are nice and all.

No 3rd person? Huh

Change the dvars to this, the last thing I changed was the pitch dvars and previously it was in 3rd person.

Code:
self setClientDvars( "cg_thirdPerson", 1, "cg_thirdPersonRange", 1024 );
Reply

#7
Did the 3rd person got fixed?
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Norecoil Tester islamsaab 4 2,854 10-25-2012, 23:21
Last Post: islamsaab
  Norecoil Tester islamsaab 3 2,530 10-25-2012, 11:27
Last Post: d0h!
  cheap alcohol breath tester = arduino! rotceh_dnih 5 4,545 04-12-2012, 19:16
Last Post: Arteq

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.