Post: Model manipulation.
08-17-2015, 04:18 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); How would I make a loop that kept on rotating a specific model so it would keep doing 360s. Also how would I remove the model whenever i wanted. Also how would I turn the model invisible like I would a player.
(adsbygoogle = window.adsbygoogle || []).push({});
08-17-2015, 04:37 PM #2
-Numb
You talkin to me?
Originally posted by 15987632 View Post
How would I make a loop that kept on rotating a specific model so it would keep doing 360s. Also how would I remove the model whenever i wanted. Also how would I turn the model invisible like I would a player.


Loop()
{

for(;Winky Winky
{
model RotateTo(angles, time);
wait time;
}
}

Remove an entity/model
model destroy();

Make an entity/model invisible
model hide();

Make it visible again
model show();
08-17-2015, 11:22 PM #3
iiiCenTurY
Gym leader
Originally posted by Numb View Post
Loop()
{

for(;Winky Winky
{
model RotateTo(angles, time);
wait time;
}
}


I would use rotateyaw(360, time); Happy
08-18-2015, 06:55 AM #4
ok guys this is what i have so far

    
StartTest(model)
{
level thread TestSpawnEntity(model, self.origin, 30, self.name);
}

TestSpawnEntity(model, origin, time, spawnerplayer)
{
level endon("game_ended");
self endon("ModelDestroyed");
showtimes = [];
hidetimes = [];
hidetimes[0] = 20;
showtimes[0] = 18;
hidetimes[1] = 16;
showtimes[1] = 14;
hidetimes[2] = 12;
showtimes[2] = 10;
hidetimes[3] = 9;
showtimes[3] = 8;
hidetimes[4] = 7;
showtimes[4] = 6;
hidetimes[5] = 5.5;
showtimes[5] = 5;
hidetimes[6] = 4.5;
showtimes[6] = 4;
hidetimes[7] = 3.5;
showtimes[7] = 3;
hidetimes[8] = 2.75;
showtimes[8] = 2.5;
hidetimes[9] = 2.25;
showtimes[9] = 2;
hidetimes[10] = 1.75;
showtimes[10] = 1.5;
hidetimes[11] = 1.25;
showtimes[11] = 1;
hidetimes[12] = .75;
showtimes[12] = .5;
hidetimes[13] = .25;
showtimes[13] = .13;

timer = time;
model = spawnEntity("script_model", model, origin, (90, 0, 0));

for(;Winky Winky
{

for(i = 0; i < showtimes.size; i++)
{
if(showtimes[i] == timer)
{
model show();
}
else if (hidetimes[i] == timer)
{
model hide();
}
}
if(timer <= 0)
{
model destroy();
self notify("ModelDestroyed");

}
RotateModel(model, 1);


foreach(player in level.players)
{
if(Distance(player.origin, Flag1.origin) <= 100 && player.name != spawnerplayer)
{
model destroy();
level.currentnumberofdrops -= 1;
self notify("ModelDestroyed");

}
}
wait .01;
timer -= .01;
}




}

RotateModel(model, time)
{
if(model.cooldown != false)
{
model.cooldown = false;
model rotateyaw(360, time);
wait time;
model.cooldown = true;
}

}


When a player other than the player who spawned the model walks over the model its supposed to be destroyed. Also its supposed to mimic the zombies drops such as double points and stuff. The model is not destroyed when walked over. Also the model only keeps spinning for the host. For everyone else it only spins in one circle then stops. Also it never flashes visible and invisible like i tried to make it do.
08-18-2015, 06:57 AM #5
FRINZ
I’m too L33T
okay wat u trying to do excatly and the purpose
08-18-2015, 01:24 PM #6
Originally posted by 7584
okay wat u trying to do excatly and the purpose


What i am trying to do is recreate the drops from zombies. The drops being nukes, double points, and other stuff like that. This was supposed to be a test and this was supposed to make a bomb briefcase (was my test model) spin in circles for 30 seconds then disappear. in the last 20 seconds of its "life" it was supposed to get hidden and shown at the times in the arrays. At the 30 second mark it was supposed to be destroyed. All this time if a player other than the one who spawned it ran over it, it was also supposed to be destroyed.
08-18-2015, 02:01 PM #7
dtx12
Do a barrel roll!
If you need just to recreate powerups for zombies, just check _zm_powerups.gsc
08-19-2015, 01:44 AM #8
Originally posted by dtx12 View Post
If you need just to recreate powerups for zombies, just check _zm_powerups.gsc


where can i find that?
08-19-2015, 01:44 AM #9
itsSorrow
In my man cave
Originally posted by 15987632 View Post
where can i find that?


gsc dump

The following user thanked itsSorrow for this useful post:

15987632

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo