Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Make Trees Fall
#1
Hello

This will make that when you shot a tree, it will fall down.

Example of usage:

Code:
treee = spawn( "script_model", self.origin );
treee setModel( "foliage_cod5_tree_pine05_large_animated" );
treee thread CanFall();

Code:

Code:
CanFall()
{
    self setCanDamage( true );
    for( ; ; )
    {
        self waittill( "damage", damage, attacker, direction_vec, point );
        if( ! isPlayer( attacker ) )
            continue;
        if( randomInt( 5 ) != 3 ) //Put the number inside the randomInt higher to make it stronger
            continue;
        break;
    }
    treeorg = spawn( "script_origin", self.origin );
    pos1 = ( point[0], point[1], 0 );
    pos2 = ( self.origin[0], self.origin[1], 0 );
    treeorg.angles = vectorToAngles( pos1 - pos2 );
    pos1new = ( point[0], point[1], 0 );
    pos2new = ( self.origin[0], self.origin[1], 0 );
    treeorg.angles = VectorToAngles( pos1new - pos2new );
    self linkTo( treeorg );
    treeorg rotatePitch( -90, 1.1, 0.05, 0.2 );
    treeorg waittill( "rotatedone" );
    treeorg rotatePitch( 5, 0.21, 0.05, 0.15 );
    treeorg waittill( "rotatedone" );
    treeorg rotatePitch( -5, 0.26, 0.15, 0.1 );
    treeorg waittill( "rotatedone" );
    self Unlink();
    treeorg delete();
}
Reply

#2
old , might as well put in the wind function aswell
Reply

#3
al tyr it right nwo adding it to horse
[Image: 107m71v.gif]
[Video: ]>>no i dident learn my leasonAngryTongue<<<
[Image: 2mxmj4m.gif]
[Image: vgrbxs.png]
Reply

#4
(04-01-2012, 12:23)rotceh_dnih Wrote: old , might as well put in the wind function aswell

Old? The wind function is useless in MW2.
Reply

#5
haha lol shizzle @Yamato
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

Reply

#6
(04-01-2012, 12:36)Yamato Wrote:
(04-01-2012, 12:23)rotceh_dnih Wrote: old , might as well put in the wind function aswell

Old? The wind function is useless in MW2.

No, it's not. You can also make the three animated by adding a targetname or something like that.
Reply

#7
(04-01-2012, 12:53)Rendflex Wrote:
(04-01-2012, 12:36)Yamato Wrote:
(04-01-2012, 12:23)rotceh_dnih Wrote: old , might as well put in the wind function aswell

Old? The wind function is useless in MW2.

No, it's not. You can also make the three animated by adding a targetname or something like that.

Or scriptmodelplayanim("foliage_cod5_tree_pine05_large_sway");
Reply

#8
no photo no how to install it please make a iwd file
Reply

#9
(06-14-2013, 20:11)Nero Z zero Wrote: no photo no how to install it please make a iwd file

again, buy it.
and you might have been missed that this is the " Scripts and Code Snippets" section, thats not a pre compiled mod.

also take your time and read through the modding tutorials, then take also more time and try to implement it by yourself.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Make area detect. flag Teleport lewisbibo 4 5,016 10-12-2013, 18:10
Last Post: EnVi Sweden Rocks
Wink Make Platforme lewisbibo 5 5,013 10-08-2013, 14:35
Last Post: 8q4s8
  Make obj MW3.by lewisbibo lewisbibo 3 3,714 10-05-2013, 20:16
Last Post: Nekochan
  Make obj MW3.by lewisbibo lewisbibo 0 2,342 10-03-2013, 20:19
Last Post: lewisbibo
  Help need help?how to make plugins code hXnarutoXone 12 8,626 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Make ac130 shoot custom bullets Ra3shed 0 2,744 07-23-2013, 13:02
Last Post: Ra3shed
  how to make a plugin (mod) E-losev 5 4,362 07-12-2013, 15:48
Last Post: OzonE
  How to make superjump mod TDM sniper hipperz 4 4,002 03-28-2013, 15:09
Last Post: hillbilly
  Help Make Waypoint FaiR_PLaY 10 6,388 02-12-2013, 13:09
Last Post: archit
Smile Need Someone to Make an Ammo Replenishing Box SkATerJoN 5 3,990 01-18-2013, 17:31
Last Post: tomglazer

Forum Jump:


Users browsing this thread:
1 Guest(s)

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