Blockland Forums > Modification Help

Vehicle Spawning

Pages: << < (4/6) > >>

Kalphiter:


--- Quote from: heedicalking on September 19, 2010, 06:28:18 PM ---%spawnbrick wait what the doesn't even exist. I am so confused right now. I've read, understood, and wrote much more difficult scripts than this but I just cannot figure this out. I am going to try the dump thing now I guess.

--- End quote ---
That was just an example, god dammit.
%brick

You're hopeless.

heedicalking:


--- Quote from: Kalphiter on September 19, 2010, 06:49:30 PM ---That was just an example, god dammit.
%brick

You're hopeless.

--- End quote ---
Tried that too.

Kalphiter:

Stick echo(%brick.getName()); in there somewhere.

heedicalking:

I started over and it is going good so far. I want to know how I can make it so when the vehicle dies, is auto respawned, or the respawn button is hit, it gets set to "NONE" and nothing happens.

heedicalking:


--- Code: ---$VehicleCost["Rowboatarmor"] = "300 0"; //First is Wood, Second is Steel
$VehicleCost["RowboatPlayer"] = "300 0"; //First is Wood, Second is Steel
$VehicleCost["PlayerRowboatarmor"] = "300 0"; //First is Wood, Second is Steel
$VehicleCost["Jeepvehicle"] = "300 0";


function Buyvehicle(%brick,%vehicle)
{
%a = getWord($VehicleCost[%vehicle],0);
%b = getWord($VehicleCost[%vehicle],1);
if(%a !$= "")
{
if(%client.Colonies["Wood"] >= %a && %client.Colonies["Steel"] >= %b)
{
echo("YES IT WORKS");
}
else
{
echo("DERP NOT ENOUGH STUFZ");
}
}
else echo("NO!!!");
}
package SpawnColoniesPlayer
{

function fxDtsBrick::spawnVehicle(%brick,%vehicle)
{
Parent::spawnVehicle(%brick,%vehicle);
echo(%brick.vehicle.Getdatablock().Costwood);
%newvehicle = %brick.vehicle.Getdatablock();
Buyvehicle(%brick,%newvehicle);
Buyvehicle(%brick,%vehicle);
echo(%brick.vehicle.Costwood);

}
--- End code ---
It echoes no both times.

Pages: << < (4/6) > >>

Go to full version