Author Topic: Changing datablock  (Read 854 times)

Ok well I got rid of my old code and did this:
Code: [Select]
exec("./Particle_BlueJet.cs");
exec("./Player_Bluejet.cs");

package bluejets
{
function player::SetDatablock(%this, %datablock)
{
if(%this.getType() & %TypeMasks::PlayerObjectType && isObject(%this))
{
%Player = %this.player;
%Player.setdatablock("PlayerBlueJet");
}
Parent::SetDatablock(%this, %datablock);
}
};
activatepackage(bluejets);
And it doesn't syntax but it does this:
Code: [Select]

Client checking Add-On: Player_BlueJet
Loading Add-On: Player_BlueJet (CRC:-1242421571)
Executing Add-Ons/Player_BlueJet/client.cs.
Executing Add-Ons/Player_BlueJet/Particle_BlueJet.cs.
Add-Ons/Player_BlueJet/Particle_BlueJet.cs (0): Unable to find parent object playerJetparticle for ParticleData.
Add-Ons/Player_BlueJet/Particle_BlueJet.cs (0): Unable to find parent object playerJetEmitter for ParticleEmitterData.
Executing Add-Ons/Player_BlueJet/Player_Bluejet.cs.
And then Blockland stops working. What's wrong?
*NOTE*
It's client-sided, can you do this Client sided?
« Last Edit: April 05, 2009, 02:24:49 PM by AGlass0fMilk »

I renamed it Server.cs and now it doesn't stop working, but it doesn't work. What do I do to make it so once a player joins a server, their default datablock is the Blue Jet player? <<MAIN MISSION
« Last Edit: April 05, 2009, 02:39:34 PM by AGlass0fMilk »

Wouldn't this work?
Code: [Select]
function GameConnection::onconnect(%client)
{
function player::SetDatablock(%this, %datablock)
{
if(%this.getType() & %TypeMasks::PlayerObjectType && isObject(%this))
{
%Player = %this.player;
%Player.setdatablock("PlayerBlueJet");
}
Parent::SetDatablock(%this, %datablock);
}
};

just replace the normal jet emitters with the blue ones, then it works for every jets player type and Standard Player

Yeah but people some people on RTB commented that they don't want it to replace the default jets, how could I accomplish my mission objective Space?

On the other hand I could just make a server command to toggle them...
« Last Edit: April 05, 2009, 03:02:42 PM by AGlass0fMilk »

Yeah but people some people on RTB commented that they don't want it to replace the default jets, how could I accomplish my mission objective Space?

On the other hand I could just make a server command to toggle them...
How do you make something toggle-able?

Code: [Select]
return;
}
if(isEventPending(%victim.whiteoutsch))
{
This is a part of a Private script that blinds a player (white out their screen forever) until they die or I type the command again.

Now ANSWER THE QUESTION PLEASE.

Pretty sure you can't package GameConnection::OnConnect anymore

**UPDATE**
I have a new code here it is:
Code: [Select]
exec("./Particle_BlueJet.cs");
exec("./Player_Bluejet.cs");

package bluejets
{
function GameConnection::OnClientEnterGame(%this)
{
if(%this.getType() & %TypeMasks::PlayerObjectType && isObject(%this))
{
%Player = %this.player;
%Player.setdatablock("PlayerBlueJet");
}
Parent::OnClientEnterGame(%this);
}
};
activatepackage(bluejets);
What can I do to make this work? I want it so that the persons default player datablock is my blue jet thing. But I also want them to be able to toggle it.
« Last Edit: April 05, 2009, 04:24:05 PM by AGlass0fMilk »