Call of duty bo3: spinning models: Difference between revisions
Jump to navigation
Jump to search
m (→Radiant) |
No edit summary |
||
Line 50: | Line 50: | ||
} | } | ||
</pre> | </pre> | ||
== Extra == | |||
If you want to have a dynamic light behind a rotating object, the shadow option must be changed to "always" in order for the model shadow to update in RealTime | |||
[[File:wiki_light_fan.jpg]] |
Revision as of 23:23, 4 September 2017
Radiant
- In radiant, place your model then turn it into a script_model and add some KVPs:
- targetname value: rotate_model
- script_noteworthy and value x y or z - depending on the axis of rotation (testing required)
- speed value: from 0 to 10 (0.5 is default)
Scripting
- Place in your Main function in MAP GSC:
level thread rotate_fans();
- Then this at end of the scripts:
function rotate_fans() { rotate_obj = getentarray("rotate_model","targetname"); if(isdefined(rotate_obj)) { for(i=0;i<rotate_obj.size;i++) rotate_obj[i] thread rotate(); } } function rotate() { if (!isdefined(self.speed)) self.speed = 0.5; while(true) { if (self.script_noteworthy == "z") self rotateYaw(360,self.speed); else if (self.script_noteworthy == "x") self rotateRoll(360,self.speed); else if (self.script_noteworthy == "y") self rotatePitch(360,self.speed); wait ((self.speed)-0.1); } }
Extra
If you want to have a dynamic light behind a rotating object, the shadow option must be changed to "always" in order for the model shadow to update in RealTime