Can bots pick up a pickup?
#1

Hey,
I've set some pickups (Type: 14 - Pickupable, but only when in a vehicle. Falls through objects made with CreateObject, etc.)
and when bot drives through them with a car, nothing happens.. But then I sit as a passenger in bot vehicle, pickup get's picked up...
So does that means that bots cannot pick up pickups?
Reply
#2

Pickups aren't synced, so unless you have a global event that takes place when someone/thing pickups a pickup, how could you know the NPC didn't get the pickup?
Reply
#3

Quote:
Originally Posted by Jay_
Pickups aren't synced, so unless you have a global event that takes place when someone/thing pickups a pickup, how could you know the NPC didn't get the pickup?
I can show you the code..
pawn Код:
public OnGameModeInit()
{
    BusStopPickup1 = CreatePickup(323,14,-1967.4030,724.0678,45.4586);
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == BusStopPickup1)
    {
      print("Pickup 1 picked up"); //When bot drives through pickup this line doesn't work. When I'm with bot, this line works
      foreach(Player,i)
        {
            if(PlayerToPoint(5.0,i,-1964.3035, 720.1036, 45.7245))
            {
                printf("%i is in bus station!",i);
            }
            else print("Nobody's in Bus Stop");
        }
        return 1;
    }
    return 1;
}
Reply
#4

In that case, no, NPCs cannot pickup pickups
Reply
#5

Quote:
Originally Posted by Jay_
In that case, no, NPCs cannot pickup pickups
That's bad...
I'll try to change all stuff to IsPlayerInRangeOfPoint if that works..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)