Global scale

O Ilusionista

Captain 100K
I want to do a global scale on my char, changing the scale on all frames by script, without going in every anim and putting a drawmethod.

I remember uTunnels said I can put a script at the character header, so I tried this:

Code:
@script
void self = getlocalvar("self");
setdrawmethod(self, 1, 128, 128, NULL(), NULL(), NULL(), NULL(), NULL(), NULL(), NULL(), NULL(), NULL())
@end_script

But BOR crashes:
Script error: data/chars/beast/beast.txt, line 8: Invalid function call or expression 'if' (in production 'postfix_expr2')

    if(animhandle==236)
    ^


********** An Error Occurred **********
*            Shutting Down            *

Fatal Error in load_cached_model, file: data/chars/beast/beast.txt, line 667, message: Error parsing function main of animation script in file '%s'!

how can I do it?
 
There are several ways. Which one is best would depend specifically on what you want to do. For example, if you want to scale the entity based on how far it is from the "camera" along Z axis, you'd put a draw control script in the movez event.

DC
 
Just place a setdrawmethod command into a spawn script. Once set by script, drawmethod is persistent until changed or the entity is destroyed.

DC
 
Back
Top Bottom