Block update on set
#4
Something like this:
class cScheduleBlock : public cWorld::cTask
{
public:
   int m_PosX, m_PosY, m_PosZ;
   cScheduleBlock(int a_PosX, int a_PosY, int a_PosZ):
      m_PosX(a_PosX),
      m_PosY(a_PosY),
      m_PosZ(a_PosZ)
   {
   }
   
protected:
   virtual void Run(cWorld & a_World) override
   {
      // Execute code with m_PosX, m_PosY and m_PosZ
   }
};

Then you can create the cScheduleBlock using:
cScheduleBlock BlockChange = cScheduleBlock(a_BlockX, a_BlockY, a_BlockZ);
a_World->ScheduleTask(NumTicks, BlockChange);

I didn't test any of this, so there might be some syntax mistakes.
Reply
Thanks given by:


Messages In This Thread
Block update on set - by Hax52 - 06-19-2015, 01:53 AM
RE: Block update on set - by NiLSPACE - 06-19-2015, 02:26 AM
RE: Block update on set - by Hax52 - 06-20-2015, 04:54 AM
RE: Block update on set - by NiLSPACE - 06-20-2015, 05:09 AM
RE: Block update on set - by Hax52 - 06-21-2015, 12:07 AM



Users browsing this thread: 3 Guest(s)