Gravity (Packethook 0x7, 0x8)

Post your Custom Scripts or Packages.
Post Reply
FreeSoul
Master Poster
Posts: 90
Joined: Sat Feb 04, 2006 9:14 am

Gravity (Packethook 0x7, 0x8)

Post by FreeSoul »

The source isn't mine... I've made a few fixes for multis and z<0.
works for items placed on other items...

example: bottle on table
If you pick the table the bottle will fall down on the ground
Attachments
gravity.zip
Gravity system for items
(3.03 KiB) Downloaded 499 times
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

hehe you should have the bottle shatter into little pieces if you do that too :P :lol:
FreeSoul
Master Poster
Posts: 90
Joined: Sat Feb 04, 2006 9:14 am

Post by FreeSoul »

hehehe... yes, but if someone have pillow under the table? :)
or if you have nitro in the bottle??

Code: Select all

foreach item in listitemsnearlocation(bottle.x,bottle.y,bottle.z,20)
destroyitem(item);
//here make some explosion anims :)
endforeach
if (item.multi)
destroymulti(bottle.multi);
endif
destroyitem(bottle);
???:D
Matrix
Neophyte Poster
Posts: 32
Joined: Fri Feb 03, 2006 9:13 am

Post by Matrix »

explosion anims :)
FreeSoul
Master Poster
Posts: 90
Joined: Sat Feb 04, 2006 9:14 am

Post by FreeSoul »

in drop.src should be:
MoveItemToLocation( item, x, y, z );

without forcelocation :)
Post Reply