Blockland Forums > Modification Help
Looping a Schedule/ Obtaining Health of a Vehicle [Fixed]
Chrono:
It might be WheeledVehicle::Damage and FlyingVehicle::Damage
KuriousGeorge:
and it uses the same arguments as Armor:onMount?
Pew446:
--- Code: ---function loopa(){
schedule(1000,0,loopb);
}
function loopb(){
dostuff
loopa();
}
--- End code ---
?
Chrono:
--- Quote from: KuriousGeorge on October 11, 2010, 07:25:50 PM ---and it uses the same arguments as Armor:onMount?
--- End quote ---
No, but probably the same as ::damage
--- Quote from: Pew446 on October 11, 2010, 07:28:30 PM ---
--- Code: ---function loopa(){
schedule(1000,0,loopb);
}
function loopb(){
dostuff
loopa();
}
--- End code ---
?
--- End quote ---
As much as it would work, I could see several problems that could come from it.
KuriousGeorge:
Now we're getting off topic from the orginal post, but let me make sure I have my arguments right.
function Armor::damage(%this, %obj, %sourceObject, %position, %damage, %damageType)
%this is the vehicle
%obj is the driver
%sourceObject is the one inflicting damage
%damage is the amount of damage dealt
Are these arguments right?
Btw, thanks Chrono for helping me out.