ItsMods
[Release] Make Trees Fall - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: [Release] Make Trees Fall (/Thread-Release-Make-Trees-Fall.html)



Make Trees Fall - Yamato - 04-01-2012

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(); }



RE: Make Trees Fall - rotceh_dnih - 04-01-2012

old , might as well put in the wind function aswell


RE: Make Trees Fall - rawr-saours - 04-01-2012

al tyr it right nwo adding it to horse


RE: Make Trees Fall - Yamato - 04-01-2012

(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.


RE: Make Trees Fall - Xzite - 04-01-2012

haha lol shizzle @Yamato



RE: Make Trees Fall - Rendflex - 04-01-2012

(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.


RE: Make Trees Fall - Yamato - 04-01-2012

(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");


RE: Make Trees Fall - Nero Z zero - 06-14-2013

no photo no how to install it please make a iwd file


RE: Make Trees Fall - xfxtroll - 06-15-2013

(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.