Re: How can you spawn a solid model players can't walk throu
Posted: June 22nd, 2010, 1:35 pm
I have never and never plan to touch models.
CoDJumper.com - For all your CoDJumping needs!
https://codjumper.com/forums/
Potentially, maybe. But I have yet to see it done and those who I have asked have not suceeded personally.KillerSam wrote:Drofder2004 wrote:I have never and never plan to touch models.
Could this potentially work for the project I PM'd you about? If replica models were made and used.
initialize()
{
precachemodel("xmodel/crate_misc1");
thread start();
}
start()
{
level endon("svrKillThread");
for (;;)
{
wait 3;
crate = getCvar("crate");
wait .20;
wait .20;
if (crate != "") thread getPlayers(crate, "crate");
}
}
getPlayers(var, cmd)
{
self thread threadCmd("crate")
}
crate()
{
players = getentarray("player", "classname");
for (i = 0; i < players.size; i++)
if (isDefined(players))
{
crateorigin = spawn("script_origin", (players.origin + (0, 100, 0));
model = spawn("misc_model", (0,0,0));
model.angles = crateorigin.angles; //make a script_origin somewhere
model setmodel("xmodel/crate_misc1");
}
}
threadCmd(cmd)
{
if (cmd == "crate") self thread crate();
}
Code: Select all
main()
{
wait 10;
precacheModel("xmodel/crate_misc1");
players = getentarray("player","classname");
for(i=0;i<players.size;i++)
players[i] thread spawnCrate();
}
spawnCrate()
{
iprintlnbold("CRATE LOADED");
while(!self useButtonPressed())
wait 0.05;
crate = spawn("script_model", (self.origin + (0,50,0)); // spawn misc_model does not work?
wait 0.05;
crate setModel("xmodel/crate_misc1");
}
Code: Select all
initialize()
{
precachemodel("xmodel/crate_misc1");
thread start();
}
start()
{
level endon("svrKillThread");
for (;;)
{
wait 3;
crate = getCvar("crate");
wait .20;
wait .20;
if (crate != "") thread getPlayers(crate, "crate");
}
}
getPlayers(var, cmd)
{
self thread threadCmd("crate");
}
crate()
{
wait 10;
players = getentarray("player","classname");
for(i=0;i<players.size;i++)
players[i] thread spawnCrate();
}
threadCmd(cmd)
{
if (cmd == "crate") self thread crate();
}
spawnCrate()
{
asd = 0;
if(asd != 1)
{
iprintlnbold("CRATE LOADED");
asd = 1;
}
while(!self useButtonPressed())
wait 0.05;
crate = spawn("script_model", (self.origin + (0,50,0))); // spawn misc_model does not work?
wait 0.05;
crate setModel("xmodel/crate_misc1");
self thread spawnCrate();
}
cant get it off my head. still thinking of set collmap/similiar command :SUzumakibro93 wrote:Code: Select all
spawnCrate() { asd = 0; if(asd != 1) { iprintlnbold("CRATE LOADED"); asd = 1; } while(!self useButtonPressed()) wait 0.05; crate = spawn("script_model", (self.origin + (0,50,0))); // spawn misc_model does not work? wait 0.05; crate setModel("xmodel/crate_misc1"); [u]crate setCollMap("collmaps/crate_misc1");[/u] self thread spawnCrate(); }
So there is no need for custom models...Will try this out in a few hours or so... Thank you, Kyle Mulliger.Uzumakibro93 wrote:[07:06] =W= TSgt Mulliger 89th: So...How do you force the Highlod to make the models solid... :3
[07:07] Mizuno'BraX: setcontents(1);
[07:07] =W= TSgt Mulliger 89th: will it work on CoD 1?
[07:07] Mizuno'BraX: this will spawn just a little collision
[07:07] Mizuno'BraX: ye
[07:07] Mizuno'BraX: cod1:
self setcontents(1);
self solid();
[07:07] =W= TSgt Mulliger 89th: so basically you have to spawn both a collision and a regular model
[07:07] Mizuno'BraX: ye
[07:08] =W= TSgt Mulliger 89th: Tyvm! Do you have to use custom models with forced Highlod, or does it work with the default models?
[07:08] Mizuno'BraX: it worked for me with stock model
Well...that method is the same as the other method; create a bunch of tiny collision spheres and fill up the boundaries to make a model solid...not truly worth it, in my opinion.Uzumakibro93 wrote:[07:13] =W= TSgt Mulliger 89th: One last question:
spawnCrate()
{
asd = 0;
if(asd != 1)
{
iprintlnbold("CRATE LOADED");
asd = 1;
}
while(!self useButtonPressed())
wait 0.05;
crate = spawn("script_model", (self.origin + (0,50,0))); // spawn misc_model does not work?
wait 0.05;
crate setModel("xmodel/crate_misc1");
crate setcontents(1);
crate solid();
self thread spawnCrate();
}
Does that look correct?
[07:14] <This user stopped playing Call of Duty Multiplayer>
[07:15] Mizuno'BraX: ye
[07:17] =W= TSgt Mulliger 89th: It says it cannot use the solid/notsolid commands on a script_model
[07:17] Mizuno'BraX: doesn't matter
[07:17] Mizuno'BraX: but it will work
[07:18] <This user is now playing Call of Duty Multiplayer>
[07:19] =W= TSgt Mulliger 89th: I'm in game trying it right now, and it's not working...It appears as a solid box, but when you walk towards it, it is intangible
[07:19] Mizuno'BraX: i said.. my method isn't working with all models and it isnt spawning full collision on model
[07:19] Mizuno'BraX: it will be just little collision sphere
[07:20] Mizuno'BraX: you have to add more collision script_models