I created some custom XSI scripts today for adding Null points.
Here's a few examples if anyone would like to do something similar.
Instructions to setup as a custom toolbar button:
- On Custom Toolbar right click "Customize Toolbar..."
- Select "Toolbar Widgets"
- Drag "Script Button" onto toolbar
- Paste or create script command (my script is JScript for the scripting language).
This is a script that creates Null points for Weapon-0 ensuring the P### is incremented properly in XSI. The icon is also automatically set to an arrow, and the color set to blue. I cloned this button for Weapon-1 and Weapon-2, and bombing.
var i;
for (i = 1; i<99; i++) {
try {
if (i<10) {
SelectObj("P00" + i + "-Weapon-0")
} else {
SelectObj("P0" + i + "-Weapon-0")
}
} catch(e) {
break;
}
}
LogMessage(i);
var name;
if (i<10) {
name = "P00" + i + "-Weapon-0";
} else {
name = "P0" + i + "-Weapon-0";
}
GetPrim("Null", name, "rootpoint", null)
SetValue(name + ".null.primary_icon", 10, null);
SetValue(name + ".null.shadow_icon", 10, null);
SetValue(name + ".null.shadow_colour_custom", true, null);
SetValue(name + ".null.B", 1, null);
This script creates the common Null points with Rings and the color yellow.
GetPrim("Null", "P001-Above", "rootpoint", null)
SetValue("P001-Above.null.primary_icon", 2, null);
SetValue("P001-Above.null.shadow_icon", 2, null);
SetValue("P001-Above.null.shadow_colour_custom", true, null);
SetValue("P001-Above.null.R", 1, null);
SetValue("P001-Above.null.G", 1, null);
GetPrim("Null", "P001-Aura", "rootpoint", null)
SetValue("P001-Aura.null.primary_icon", 2, null);
SetValue("P001-Aura.null.shadow_icon", 2, null);
SetValue("P001-Aura.null.shadow_colour_custom", true, null);
SetValue("P001-Aura.null.R", 1, null);
SetValue("P001-Aura.null.G", 1, null);
GetPrim("Null", "P001-Center", "rootpoint", null)
SetValue("P001-Center.null.primary_icon", 2, null);
SetValue("P001-Center.null.shadow_icon", 2, null);
SetValue("P001-Center.null.shadow_colour_custom", true, null);
SetValue("P001-Center.null.R", 1, null);
SetValue("P001-Center.null.G", 1, null);
This script creates teh exhaust Null points with arrows, the color green and automaticallly rotates it 180 degress
var i;
for (i = 1; i<99; i++) {
try {
if (i<10) {
SelectObj("P00" + i + "-Exhaust")
} else {
SelectObj("P0" + i + "-Exhaust")
}
} catch(e) {
break;
}
}
LogMessage(i);
var name;
if (i<10) {
name = "P00" + i + "-Exhaust";
} else {
name = "P0" + i + "-Exhaust";
}
GetPrim("Null", name, "rootpoint", null)
SetValue(name + ".null.primary_icon", 10, null);
SetValue(name + ".null.shadow_icon", 10, null);
SetValue(name + ".null.shadow_colour_custom", true, null);
SetValue(name + ".null.G", 1, null);
Rotate(null, 0, 180, 0, siAbsolute, siPivot, siObj, siY, null, null, null, null, null, null, null, 0, null);
I also created a couple of buttons for Fire Left, Fire Right and Fire Back using the Rotate shown in Exhuast.
Hope this helps someone else out too.
Enjoy!