To use a hotkey in game, you need to first tell the game that you want to create a new hotkey and assign a script that should be run when the user press the hotkey. Select which one you prefer, for this example, im choosing TRUE. True and False are found in the constants menu. It runs quicker without any explosion as it doesn't have to compute and render the explosion frames. Setting it to will show the explosion if you are close. Setting it to will mean no explosion is played when the command is run, the object will just disappear. The final argument is for the Explosion, this is a True or False value. Next we use the destruct target command, this is found in the General Object Commands menu.Īnd the first argument is the object to run the command on, in this case we want to use the object in the varible $target. The current script will check if the players aim is valid otherwise it will exit. Now we can carry on with the rest of the script. If you called this script from another, the return varible from the call script command will be what ever value you set here, in this case it will equal "null". This command will leave the script, so any more commands below will not be executed. Then select the argument as "null" as we dont need to return anything. In the Script Calls commands submenu in the General Commands menu you will find a command to return. This will then check if the returned object exists, if it doesn't it will perform the command below the statement, this is where we leave the script. Set the first value to "Skip If" so it will skip the next statement if the object exists.įinally, set the Argument to the target object, $target. Use the command "exists" found in the General Object Commands Menu. If the player has no target it will return null. Next we need to test if the target is valid, we do this by checking if the object $target exists. It doesn't have any arguments, just a return value, set the return value as a varible of your choise, like target. The first command is to get the targetted object, the command is get player tracking aim, this is found in the Fly command menu. Hotkey scripts are always run as global scripts, so the pointer will not work as its not run on an object, if you wish to use it on the current players ship, then use the pointer. The first thing to do is create a script, this script will be the script called when the hotkey is activated.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |