one coordinate = only one object - HOW? +rep!
#1

hi,

im using this code to spawn 5 pickups and random defined spawnpoints but sometimes it happens that there are 2 or even 3 pickups spawned at the same place.
How would i prevent that?
How can i make it like only 1 pickup can be spawned at a place?

+rep for help
pawn Код:
new Float:MoneyRushPoints[60][5] = //spawnpoints
{
    {-1633.6028,-2244.1521,31.4766},
    {-1635.2443,-1935.8237,115.1392},
    {-1335.9425,-2248.6763,32.5839},
    {-1845.4031,-1709.8015,41.1106},
    {-1820.0410,-1608.4302,23.0156},
    {-1982.5382,-2120.4873,74.5776},
    {-2089.5581,-2346.9045,30.6250},
//etc.
};

            new RRush = random(sizeof(MoneyRushPoints));
            DynPickup[2] = CreateDynamicPickup(1550,2,MoneyRushPoints[RRush][0],MoneyRushPoints[RRush][1],MoneyRushPoints[RRush][2],0);

            for(new i; i < 1; i++)
            {
                RRush = random(sizeof(MoneyRushPoints));
                PickUpDrugOnMr[1] = CreateDynamicPickup(1241,3,MoneyRushPoints[RRush][0],MoneyRushPoints[RRush][1],MoneyRushPoints[RRush][2],0);

                RRush = random(sizeof(MoneyRushPoints));
                PickUpDrugOnMr[2] = CreateDynamicPickup(1241,3,MoneyRushPoints[RRush][0],MoneyRushPoints[RRush][1],MoneyRushPoints[RRush][2],0);

                RRush = random(sizeof(MoneyRushPoints));
                PickUpDrugOnMr[3] = CreateDynamicPickup(1241,3,MoneyRushPoints[RRush][0],MoneyRushPoints[RRush][1],MoneyRushPoints[RRush][2],0);

                RRush = random(sizeof(MoneyRushPoints));
                PickUpDrugOnMr[4] = CreateDynamicPickup(1241,3,MoneyRushPoints[RRush][0],MoneyRushPoints[RRush][1],MoneyRushPoints[RRush][2],0);

                RRush = random(sizeof(MoneyRushPoints));
                PickUpDrugOnMr[5] = CreateDynamicPickup(1241,3,MoneyRushPoints[RRush][0],MoneyRushPoints[RRush][1],MoneyRushPoints[RRush][2],0);
            }
Reply


Messages In This Thread
one coordinate = only one object - HOW? +rep! - by PawnoQ - 01.04.2012, 17:08
Re: one coordinate = only one object - HOW? +rep! - by blank. - 02.04.2012, 11:43
Re: one coordinate = only one object - HOW? +rep! - by PawnoQ - 02.04.2012, 11:46
Re: one coordinate = only one object - HOW? +rep! - by blank. - 02.04.2012, 11:51
Re: one coordinate = only one object - HOW? +rep! - by PawnoQ - 02.04.2012, 11:53
Re: one coordinate = only one object - HOW? +rep! - by PawnoQ - 05.04.2012, 16:31
Re: one coordinate = only one object - HOW? +rep! - by WooTFTW - 05.04.2012, 16:42
Re: one coordinate = only one object - HOW? +rep! - by PawnoQ - 06.04.2012, 18:55

Forum Jump:


Users browsing this thread: 1 Guest(s)