Jump to content

XML:BINA/OBJC/TRGV: Difference between revisions

the other workaround didn't work, but this one does :)
(One more FATAL SCRIPTING ERROR bypass technique)
(the other workaround didn't work, but this one does :))
Line 258: Line 258:
And the trigger volume XML will look like this:
And the trigger volume XML will look like this:


     TRGV Id="1">
     <TRGV Id="1">
         <Header>
         <Header>
             <Flags>0</Flags>
             <Flags>0</Flags>
Line 280: Line 280:
     </TRGV>
     </TRGV>


If the technique above is not enough and you are still experiencing the "FATAL SCRIPTING ERROR: exceeded maximum scripting parameter base size of 32768" error after a while, you may try set a bsl function like this:
If the technique above is not enough and you are still experiencing the "FATAL SCRIPTING ERROR: exceeded maximum scripting parameter base size of 32768" error after a while, you may try using duplicated trigger volumes, where after a while (and before the error appears) you disable the first one and active the second one (which is a copy of the first).


    func void reset_trigger_volume(){
The duplicated one can look like this:
        # set the triggers function to a dummy one
        trigvolume_setscript("BurnCharacter", "bsl_dummy_function", "entry");
        trigvolume_setscript("BurnCharacter", "bsl_dummy_function", "exit");
       
        # now reset them again to their original function
        trigvolume_reset("BurnCharacter");
    }


Then make sure that '''reset_trigger_volume''' function gets called within some regular interval (in my case I am calling it every 15000 frames).  
    <TRGV Id="2">
 
        <Header>
The above function sets the trigger volume entry and exit function calls to a dummy function. Then we immediately reset the trigger volume itself (which will reset the function calls to their originals).
            <Flags>0</Flags>
            <Position>2005.23 1239.87 -3628.82</Position>
            <Rotation>0 0 0</Rotation>
        </Header>
        <OSD>
            <Name>BurnCharacterPart2</Name>
            <Scripts>
                <Entry>trigger_damage</Entry>
                <Inside />
                <Exit>trigger_stop_damage</Exit>
            </Scripts>
            <Teams>4</Teams>
            <Size>-287.04 1 -179.85</Size>
            <TriggerVolumeId>2</TriggerVolumeId>
            <ParentId>0</ParentId>
            <Notes></Notes>
            <Flags />
        </OSD>
    </TRGV>


This seems to make the engine avoid the "FATAL SCRIPTING ERROR: exceeded maximum scripting parameter base size of 32768".
Code to switch between them:


The '''bsl_dummy_function''' should be a function that does nothing, it can look like this:
    trigvolume_enable("BurnCharacter",0); # disable the first one
    trigvolume_enable("BurnCharacterPart2",1); # activate the second one


    func void portal_dummy_function(){
Note that you should have only one of the copies active at a time (so for instance when "BurnCharacter" TV is enabled, "BurnCharacterPart2" TV should be disabled.
    }


===Mod Tool addon===
===Mod Tool addon===
489

edits