Call of duty bo3: spinning models: Difference between revisions
Jump to navigation
Jump to search
Created page with " == 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 '..." |
m →Radiant |
||
| Line 6: | Line 6: | ||
**''targetname'' value: ''rotate_model'' | **''targetname'' value: ''rotate_model'' | ||
**''script_noteworthy'' and value ''x'' ''y'' or ''z'' - depending on the axis of rotation (testing required) | **''script_noteworthy'' and value ''x'' ''y'' or ''z'' - depending on the axis of rotation (testing required) | ||
**''speed | **''speed'' value: from 0 to 10 (0.5 is default) | ||
== Scripting == | == Scripting == | ||
Revision as of 20:14, 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);
}
}