Blockland Forums > Modification Help

Vehicle Spawning

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

Desolation:


--- Quote from: heedicalking on September 19, 2010, 05:11:25 PM ---That may be useful later on. The problem is I just don't know exactly what works with that function at all. There's spawnvehicle, setvehicle, respawnvehicle, and tons of other stuff that I have no idea which does which.

Making it set the vehicle back to none if it doesn't work right.

Making it check for errors in vehicle spawning.

Making it so when the vehicle dies it gets set to "none"

There isn't a lot of references because vehicles seem to be a neglected subject for scripting. The only resource I found was the vehicle events which only gave me the args.

--- End quote ---
You can get all of that information using the dump(); function.

heedicalking:


--- Quote from: Desolation on September 19, 2010, 05:16:12 PM ---You can get all of that information using the dump(); function.

--- End quote ---
SO I just do a %vehicle.dump and I figure out how to set the vehicle to none in the script and check if it is none, as well as check for errors when spawning it?

Desolation:


--- Quote from: heedicalking on September 19, 2010, 05:49:13 PM ---SO I just do a %vehicle.dump and I figure out how to set the vehicle to none in the script and check if it is none, as well as check for errors when spawning it?

--- End quote ---
It's not that simple. You need to actually experiment and look through the functions that can be ran on it. If you don't know how to do a simple if(isObject()) then I suggest you learn the basics of scripting before moving on to something like this. :/

Kalphiter:

%spawnbrick.vehicle, I believe.

I have this code in my LogWriter:

--- Code: ---    %banCount = BanManagerSO.numBans;
    parent::servercmdunban(%unbanner, %positionInList);
    if(%banCount == BanManagerSO.numBans)
        return;

--- End code ---
You'll want to implement something similar to actually assure that the vehicle actually spawned, or changed. The code above checks that the ban actually went through.

heedicalking:


--- Quote from: Kalphiter on September 19, 2010, 06:19:01 PM ---%spawnbrick.vehicle, I believe.

I have this code in my LogWriter:

--- Code: ---    %banCount = BanManagerSO.numBans;
    parent::servercmdunban(%unbanner, %positionInList);
    if(%banCount == BanManagerSO.numBans)
        return;

--- End code ---
You'll want to implement something similar to actually assure that the vehicle actually spawned, or changed. The code above checks that the ban actually went through.

--- End quote ---
%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.

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

Go to full version