ToggleCreatureModel

Post » Wed Jan 05, 2011 3:35 am

OBSE has this command:

ToggleCreatureModel - toggles a model within a creature's model list on or off. The model path must be relative to the creature's model folder and include the ".nif" extension. When called on a reference which is currently being rendered, the reference must be disabled and then enabled before the change is visible.
(nothing) reference.ToggleCreatureModel modelPath:string enableModel:bool creature:ref


But how do I actually use it?
I've tried this:
Target.ToggleCreatureModel "armorsteel.nif" 1 Target


Where "Target" is an acquired Creature Ref, but I get nothing... In fact, it seems to be crashing the Script, since nothing runs after it...
User avatar
Eibe Novy
 
Posts: 3510
Joined: Fri Apr 27, 2007 1:32 am

Post » Wed Jan 05, 2011 4:11 am

You got to chose if you use the base object, or the reference.
If target is a reference simply leave out the last parameter:
Target.ToggleCreatureModel "armorsteel.nif" 1


If it's a base object (assuming the path is correct) it should work because the calling reference is ignored, but you should leave it out anyway:
ToggleCreatureModel "armorsteel.nif" 1 Target



Or combined, so it should work either way:
if ( IsReference Target )	Target.ToggleCreatureModel "armorsteel.nif" 1else	ToggleCreatureModel "armorsteel.nif" 1 Targetendif

User avatar
Dan Wright
 
Posts: 3308
Joined: Mon Jul 16, 2007 8:40 am


Return to IV - Oblivion