Author Topic: Making a person a horse on spawn.  (Read 1259 times)

I have that so far i am wondering what i need to change becuase it was not working. I belive that I am not refrencing the right datablock.

Help would be appreciated I am new at this.


 package Horse
{
   function gameConnection::onClientEnterGame(%client)
   {
      parent::onClientEnterGame(%client);

      %client.setDataBlock(HorseArmor)
   }
};
activatepackage(Horse);

Try %client.player instead of %client

%client is a GameConnection, so it's connection to the server.
Player is the actual object that is a player.

Ok thanks so it is the right reffence to the horse?

Ps:I feel stupid about forgetting the object.

Do i save this as a script or server? or does it not matter.
« Last Edit: September 15, 2009, 07:54:32 PM by Human Reaper »

I think this script will only work when they first spawn. I could be wrong, though.

well i am fine with that for now but it is not even working at that right now.

package Horse
{
   function gameConnection::onClientEnterGame(%client)
   {
      parent::onClientEnterGame(%client);
      %client.player.setDataBlock(HorseArmor);
   }
};
activatepackage(Horse);

Try %client.player instead of %client

%client is a GameConnection, so it's connection to the server.
Player is the actual object that is a player.
package Horse
{
   function gameConnection::onClientEnterGame(%client)
   {
      parent::onClientEnterGame(%client);
      %client.player.setDataBlock(HorseArmor);
   }
};
activatepackage(Horse);
A bit late to the party.

Thanks so this is a server or script file.

A bit late to the party.
Well he did point out the missing semicolon.

A bit late to the party.
1. He probably didn't know where you meant to put %client.player.
2. You forgot the semicolon.

Ok thanks everyone for your help and it works great.I do feel VERY stupid for my mistake, but thanks alot any ways.