Posted: 17 Dec 2007, 21:21
What kind of question is that? You just make the function return the value 200, that means 200% damage.
Open Source Realtime Strategy Game Engine
https://springrts.com/phpbb/
HitByWeaponId(var1posZ,var2posX,id,damage)
var rando
if id == 30 // some weapon that does random damage
(
rando = (Rand( 1, 20 ))*10;
return damage rando; // dis does not make sense
)
I got the public release version 0.64. Anyways, I looked through some of the scripts for the units and that just confuses me. I only have slight experience with programming, so I can understand parts of it, but I just don't understand. This is probably the next hurdle I have to go through. Anyone supply a tutorial or reference about what all it's about?Argh wrote:I'd suggest, frankly, to start with my "minimal unit" file from NanoBlobs 0.63..
Every unit requires a script, but you can make scripts which do absolutely nothing.hamsate wrote:I got the public release version 0.64. Anyways, I looked through some of the scripts for the units and that just confuses me. I only have slight experience with programming, so I can understand parts of it, but I just don't understand. This is probably the next hurdle I have to go through. Anyone supply a tutorial or reference about what all it's about?Argh wrote:I'd suggest, frankly, to start with my "minimal unit" file from NanoBlobs 0.63..
Just throwing this question out there, a unit requires a script right?
dittoPeet wrote:Nope, multiple armour classes make no logical sense and thus do not work.
Well to my mind this perfectly makes sense as you don't really give one unit an armor class (though this is what's done via the engine) but you define damage groups. If you could define groups rather than have to give every unit just one entry you could ease and clean up the process of damage groups for your weapon entries. For example if you want a fake explosion you put the default value high and add an "ALL" damage group which contains all your units so you don't have to list every category you created. This way you could have several groups like "GROUND", "AIR", "BOATS", "SUBS" and on and on. This makes the weapons code much more clean and easy and it's way faster if you would want to change a damage value (as you now have to change it for all other similar groups too). This is just a "cosmetic" nicety of course but I'd be glad to have this...lbctech wrote:ditto
And so a unit without script won't have animations, correct? It will still be able to just move around? Or does the script have a part in that, too?Rubenes wrote:Every unit requires a script, but you can make scripts which do absolutely nothing.
it will move around (or not) as defined by the unit.fbi file. iirc the BA adv solars have a more or less blank script.hamsate wrote:And so a unit without script won't have animations, correct? It will still be able to just move around? Or does the script have a part in that, too?Rubenes wrote:Every unit requires a script, but you can make scripts which do absolutely nothing.