scale entity on spawn

Gurtag

Active member
hey guys, is there a script or command to set scale/drawmethod in a entity when spawned on level? i use an alpha flame entity for torchs and the like, would like to reuse it instead of creating several clones for every torch model.
 
Like this:
spawn Gunner
@script void main() {
  performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW3"));
} @end_script
coords 210 189 0
health 1
at 0

That script will be executed once the entity Gunner is spawned into the stage, and it will force the entity to be spawned in FOLLOW3 animation instead of spawn/idle animation. With this, you can make the enemies to appear with different animations, kinda like on TMNT arcade game.

You can change that "performattack" line with something like this:
Code:
@script void main() {
    void self = getlocalvar("self");
    setdrawmethod(self, 1, 128,128, 0, 0, 0, -1);
} @end_script

For 50% scale. Look at the manu for "setdrawmethod" information.

Or use that animation change to to make a different animation and set the scale with the drawmethod shortcode there.
 
those scripts seem like a godsend man, thanks for the help, but sadly doesnt work, i think the openbor build i work with doesnt suport scripts on levels, just find out about it reading on otter thread  :'(
 
3.0.3769 here,  started moding using an even older build, dont know the vercion number, switched to 3.0.3769 for the extra imput on freespecials however several stuf got brocken or didnt feel right hence my reticense to update, anyway serching release notes found it is 3.0.3805 the one that added levelscript usage, wich is not so far away of the one i use now, plus few changes in between, might do the trick but cant find it on github.
 
Back
Top Bottom