Service to manage dynamic Script Commands |
||
Service | Arguments | Description |
SRV_CREATE_ADDEFFECT | TestDynamic, EffectType (ADD_), FlagsEffect (FADD_), JointType (JOINT_), DispX, DispY, DispZ, DurateEmit, DuratePause, Extra param array, END_LIST |
The values to type as arguments, after the TestDynamic argument, are the same you type in AddEffect= script command, but skipping the Id argument because it will be returned by current service. You have to type the END_LIST costant at end of the arguments to signal the end of the argument list |
SRV_CREATE_ANIMATION | AnimIndex, KEY1_ , KEY2_ , FAN_ flags, ENV_ Environment, Distance for Env, Extra, StateId (STATE_...) or (-)AnimationIndex array (...), END_LIST |
This service don't want the TestDynamic argument and neither it returns an ID (Animation= commands have no id) The arguments are the same you type in Animation script command, with only exception that you have to terminate the sequence of arguments with the mnemonic constant END_LIST, to signal the end of optional array with stateids or animation numbers. Note: it's not possible delete an Animation command once you create it. For this reason you should place the code to create the animation command in some procedure where it will be performed only once for level. |
SRV_CREATE_ANIMATIONSLOT | Slot, ActionType (AXT_...), AnimIndex, Key1, Key2, FAN_ flags, ENV_ Environment, Distance For Env_, Extra, StateId (STATE_...) or (-)AnimationIndex array (...), END_LIST |
This service don't want the TestDynamic argument and neither it returns an ID (AnimationSlot= commands have no id) The arguments are the same you type in AnimationSlot script command, with only exception that you have to terminate the sequence of arguments with the mnemonic constant END_LIST, to signal the end of optional array with stateids or animation numbers. Note: it's not possible delete an AnimationSlot command once you create it. For this reason you should place the code to create the animation command in some procedure where it will be performed only once for level. |
SRV_CREATE_COLOR_RGB_COMMAND | TestDynamic, Red, Green, Blue | The values to type as arguments, after the TestDynamic argument, are the same you type in ColorRGB= script command, but skipping the Id argument because it will be returned by current service. |
SRV_CREATE_MULTENVCONDITION | TestDynamic, ENV_ condition, DistanceForEnv, Extra field, array of tripled of triple values {ENV_ Condition, DistanceForEnv, Extra field}, END_LIST |
The values to type as arguments, after the TestDynamic argument, are the same you type in MultEnvCondition= script command, but skipping the Id argument because it will be returned by current service. You have to type the END_LIST costant at end of the arguments to signal the end of the argument list |
SRV_CREATE_PARAM_COMMAND | TestDynamic, PARAM_ type, arguments of given PARAM_ command, END_LIST |
The values to type as arguments, after the TestDynamic argument, are the same you type in Parameters= script command, but skipping the Id argument because it will be returned by current service. Note: all PARAM commands require to complete the argument list with the END_LIST value |
SRV_CREATE_TESTPOSITION | TestDynamic, Flags (TPOS_...), Slot Moveable, XDistanceMin, XDistanceMax, YDistanceMin, YDistanceMax, ZDistanceMin, ZDistanceMax, HOrientDiffMin, HOrientDiffMax, VOrientDiffMin, VOrientDiffMax, ROrientDiffMin, ROrientDiffMax | The values to type as arguments, after the TestDynamic argument, are the same you type in TestPosition= script command, but skipping the Id argument because it will be returned by current service. |
SRV_CREATE_TRIGGERGROUP | TestDynamic, Array with groups of three values of exported triggers, completed with END_LIST constant |
The values to type as arguments, after the TestDynamic argument, are the same you get from [Export Script Trigger] button of Set Trigger Type window of NGLE program. You have to type the END_LIST costant at end of the arguments to signal the end of the argument list The service will return the ID for the triggergroup command, or -1 if there is an error. |
SRV_DeleteAddEffect | IdOfAddEffect | Delete the AddEffect command you had created with SRV_CREATE_ADDEFFECT service |
SRV_DeleteColorRgb | IdColorRgb | Delete the ColorRgb command you had created with SRV_CREATE_COLOR_RGB_COMMAND service |
SRV_DeleteMultEnvCondition | IdOfMultEnvCond | Delete the MultEnvCondition command you had created with SRV_CREATE_MULTENVCONDITION service |
SRV_DeleteParamCommand | PARAM_ type, IdOfParameterCommand |
Delete the parameter command you had created with SRV_CREATE_PARAM_COMMAND service. The PARAM_ Type will be the same you used to create the command, and the IdOfParamCommand will be the value you got from SRV_CREATE_PARAM_COMMAND service when you created that command. |
SRV_DeleteTestPosition | IdOfTestPosition | Delete the TestPosition command you had created with SRV_CREATE_TESTPOSITION service |
SRV_DeleteTriggerGroup | IdTriggerGroup | Delete the triggergroup command you had created with SRV_CREATE_TRIGGERGROUP service |
Persistence of script commands in trng triggers |
||
Script Command | Persistence | Description |
AddEffect | Yes |
Until the effect is added to some moveable, the code requires to have yet the AddEffect script command. For this reason it's necessary delete the command only at end of the effect on that item |
ColorRGB | Mix |
Usually ColorRgb IDs will be used as argument for other script commands. To discover the persistence of ColorRgb command you have to check the main script command where these ColorRbg commands are used. |
MultEnvCondition | No |
Since the MultEnvCondition will be performed in a single frame to detect if in that moment the sequence of conditions is true or false, immediatly after the call to condition trigger, the command is no more used. Anyway this speech should be different when the MultEnvCondition will be used by some Animation or AnimationSlot command. In this case, in fact, the animation commands work forever and in same way also the linked MultEnvCondition commands. |
Parameters=PARAM_ACTOR_SPEECH | Yes | Only when whole speech sequence has been completed it will be possible delete the PARAM_ACTOR_SPEECH command |
Parameters=PARAM_BIG_NUMBERS | No |
Once you called the trigger requiring that big number parameter, that value from PARAM_BIG_NUMBERS script command will be no more used. Note: warning because the PARAM_BIG_NUMBERS works in different way respect other script commands... There is no ID for PARAM_BIG_NUMBERS command, and neither the chance to use automatic deleting. Only you can delete it after having used it, and to delete it you should supply as argument not the ID (that doesn't exist) but the same big number value you set when you created the PARAM_BIG_NUMBERS command. Another difference is that when you create PARAM_BIG_NUMBERS command you, really, add simply to the PARAM_BIG_NUMBERS sequence, another value, but this is not a new script command but only a new value added to a persistent, shared, PARAM_BIG_NUMBERS command. Note: the deleting of last number you added, it will work only if you had added only one big number. Differently, if you had added in some moment two or more big numbers, you should call many time the SRV_DeleteParamCommand, PARAM_BIG_NUMBERS service, in opposite order respect to the number sequence. Example: Service(enumSRV.CREATE_PARAM_COMMAND, PARAM_BIG_NUMBERS, 510, 1024, 330); With above service we have added to big numbers, our big numbers: 510, 1024 and 330 When we wish delete all above numbers, we should call three times the SRV_DeleteParamCommand service, passing as "id" (but it's not an ID) always the last number of our sequence. So, we'll use following code to delete above our big numbers: Service(enumSRV.DeleteParamCommand, PARAM_BIG_NUMBERS, 330); Service(enumSRV.DeleteParamCommand, PARAM_BIG_NUMBERS, 1024); Service(enumSRV.DeleteParamCommand, PARAM_BIG_NUMBERS, 510); Pratically everytime we had supplied as argument the value that, in that moment, was the last of the sequence yet present. This is only one way to delete a big number value we had added. |
Parameters=PARAM_CIRCLE | No |
Currently the PARAM_CIRCLE will be used only for condition triggers. Once the condition has been performed the PARAM_CIRCLE command can be deleted. |
Parameters=PARAM_COLOR_ITEM | No | Also when there is a change of the color for some time, the data from script command will be read and copied to progressive action struture, this means that the script command could be deleted immediatly after the trigger call. |
Parameters=PARAM_LIGHTNING | Yes | Until the lightning will be drawn the PARAM_LIGHTNING command will be required. |
Parameters=PARAM_MOVE_ITEM | Yes | The progressive action that handles the movement will require the presence of PARAM_MOVE_ITEM script command until at end of the movement |
Parameters=PARAM_PRINT_TEXT | Yes | Until the text will be displayed on the screen the progressive action requires the presence of PARAM_PRINT_TEXT script command. |
Parameters=PARAM_QUADRILATERAL | No |
Currently the PARAM_QUADRILATERAL will be used only for condition triggers. Once the condition has been performed the PARAM_QUADRILATERAL command can be deleted. |
Parameters=PARAM_ROTATE_ITEM | No |
Currently the trng code read the data in PARAM_ROTATE_ITEM command and copy these data in progressive action structure. For this reason it's not necessary that the PARAM_ROTATE_ITEM command existed for whole time of rotating, it could be deleted immediatly after the call to the trigger. |
Parameters=PARAM_SCALE_ITEM | Mix | When the scaling requires some time the linked PARAM_SCALE_ITEM has to be available for progressive action, while when the there is the FSCA_IMMEDIATE flag, the PARAM_SCALE_ITEM command will be ignored immediatly after the trigger call. |
Parameters=PARAM_SET_CAMERA | Yes | Until there is the change of camera settings the progressive action requires the presence of PARAM_SET_CAMERA command |
Parameters=PARAM_SHOW_SPRITE | Yes | For all time of sprite drawing, the PARAM_SHOW_SPRITE command has to be present. |
Parameters=PARAM_SWAP_ANIMATIONS | Yes |
In spite the swapping of animation works in immediate way, trng requires to get the presence of PARAM_SWAP_ANIMATIONS command to restore in future the original animation numbers. For this particular working mode, it's not possible delete in automatic way the PARAM_SWAP_ANIMATIONS commands and it's neither advisable to delete it in direct way using the SRV_DeleteParamCommand service |
Parameters=PARAM_TRIANGLE | No |
Currently the PARAM_TRIANGLE will be used only for condition triggers. Once the condition has been performed the PARAM_TRIANGLE command can be deleted. |
TestPosition | Mix |
The persistence of testpositon command changes in according with its settings. When testposition command it has been set with TPOS_FAST_ALIGNMENT flag or called from an Animation command with FAN_ALIGN_TO_ENV_POS flag, it will be used for some frame. Anyway, when it is a condition for animation command it should be anyway with a total persistence, while used as condition it will have no persistance. |
TriggerGroup | Mix |
Usually the TriggerGroup script command it will be used as secondary argument for some main script command. In this situation you have to check the persistence of that main script command. In the case you call it in direct way, it should have no persistence, with the exception if you use the flipeffect 373 (TriggerGroup. Perform <&>TriggerGroup from script.dat (continue performing to stop with f192 trigger) |