26.09.2010, 08:38
The easiest method i could imagine (but maybe not the most efficient) would be to store all positions of the pickups, and then, in OnPlayerPickUpPickup compare the players postion with the position of all pickups (maybe with max 1m distance to get an accurate result)
The maximum pickups are 2048, so if you need them all it would take
2048 x 4 x 4 byte = 32768 bytes = 32kb
(3 floats + 1 int (maybe you can make it a bool) to determine if it is a valid, created pickup)
The size should make no big difference if you already got a medium-big script.
The maximum pickups are 2048, so if you need them all it would take
2048 x 4 x 4 byte = 32768 bytes = 32kb
(3 floats + 1 int (maybe you can make it a bool) to determine if it is a valid, created pickup)
The size should make no big difference if you already got a medium-big script.