Place_Model Problems
Moderator: InsideQC Admins
14 posts
• Page 1 of 1
Place_Model Problems
Hello.. again
I'm here worrying about place_model
I'm using this tutorial here: "http://www.quake-1.com/docs/quakesrc.org/48.html"
(A quite simple tutorial). But My model doesn't appear in game. I follow everything to a T. I set my key, and value in the map editor. When I get in game the console yells at me about there not being a spawn function.. but wait.. isn't place_model the spawn function?
On a side note. It seem that any model I try to place doesn't work. I'm not talking about in place_model... I made an exploding canon balls function. It was supposed to spawn the "balls", and when they where shot, they would explode and trigger a door. Well, they trigger the door when you shoot them (even though they're invisible) they just don't spawn.
This place_model not working is really slowing down the progress on the mod. :/ Any help is appreciated as always!
EDIT - I must also add that I'm not using the "self.touch" in the function. It just didn't seem necessary. I tried it with self.touch in the function but it still didn't work.
I'm using this tutorial here: "http://www.quake-1.com/docs/quakesrc.org/48.html"
(A quite simple tutorial). But My model doesn't appear in game. I follow everything to a T. I set my key, and value in the map editor. When I get in game the console yells at me about there not being a spawn function.. but wait.. isn't place_model the spawn function?
On a side note. It seem that any model I try to place doesn't work. I'm not talking about in place_model... I made an exploding canon balls function. It was supposed to spawn the "balls", and when they where shot, they would explode and trigger a door. Well, they trigger the door when you shoot them (even though they're invisible) they just don't spawn.
This place_model not working is really slowing down the progress on the mod. :/ Any help is appreciated as always!
EDIT - I must also add that I'm not using the "self.touch" in the function. It just didn't seem necessary. I tried it with self.touch in the function but it still didn't work.
-

ScatterBox - Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
- Code: Select all
void() place_model =
{
precache_model (self.model);
setmodel (self, self.model);
self.skin = self.skin;
};
-

drm_wayne - Posts: 232
- Joined: Sat Feb 11, 2012 5:47 pm
Re: Place_Model Problems
drm_wayne wrote:
- Code: Select all
void() place_model =
{
precache_model (self.model);
setmodel (self, self.model);
self.skin = self.skin;
};
Didn't work.. :/
-

ScatterBox - Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
ScatterBox wrote:drm_wayne wrote:
- Code: Select all
void() place_model =
{
precache_model (self.model);
setmodel (self, self.model);
self.skin = self.skin;
};
Didn't work.. :/
iv had similar problems iv tried making something like this and the only way i could get the model to spawn is by directly setting the name.
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
Re: Place_Model Problems
maybe wrong key and value parameters or model name?)
key: model
Value: progs/Quake.mdl
try mine
key: model
Value: progs/Quake.mdl
try mine
- Code: Select all
void() model_touch =
{
local vector v;
local float yaw;
if (other.classname != "player")
return;
if (other.groundentity == self )
return;
if (other.origin_z + other.mins_z + 8 >= self.absmax_z)
{
if ((!other.flags & FL_ONGROUND))
other.flags = other.flags + FL_ONGROUND;
return;
}
v = self.origin - other.origin;
yaw = vectoyaw( v );
walkmove( yaw, frametime * 50 );
};
/*
Place model code
How to use:
add key "model" with value "path to model"
*/
void() place_model =
{
self.movetype = MOVETYPE_STEP;
self.solid = SOLID_BBOX;
precache_model (self.model);
setmodel (self, self.model);
self.skin = 0;
self.touch = model_touch;
};
Sorry for my english 
- Max_Salivan
- Posts: 93
- Joined: Thu Dec 15, 2011 1:00 pm
Re: Place_Model Problems
Max_Salivan wrote:maybe wrong key and value parameters or model name?)
key: model
Value: progs/Quake.mdl
try mine
- Code: Select all
void() model_touch =
{
local vector v;
local float yaw;
if (other.classname != "player")
return;
if (other.groundentity == self )
return;
if (other.origin_z + other.mins_z + 8 >= self.absmax_z)
{
if ((!other.flags & FL_ONGROUND))
other.flags = other.flags + FL_ONGROUND;
return;
}
v = self.origin - other.origin;
yaw = vectoyaw( v );
walkmove( yaw, frametime * 50 );
};
/*
Place model code
How to use:
add key "model" with value "path to model"
*/
void() place_model =
{
self.movetype = MOVETYPE_STEP;
self.solid = SOLID_BBOX;
precache_model (self.model);
setmodel (self, self.model);
self.skin = 0;
self.touch = model_touch;
};
This seemed promising!! But.. didn't work. I've rechecked the key and value several times. I'll post exactly what I get in the console. :
-------------------------------------
'Mapversion' is not a field
No spawn function for:
Editct 8:
Origin: '512.0 -384.0 -448.0'
Classname: Place_Model
Model: Progs/brkncan.mdl
VERSION 1.09 SERVER
---------------------------------------------------
-

ScatterBox - Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
This suggests a map which requires a certain mod is loaded in standard Quake or the wrong mod directory....maybe
Sorry for my english 
- Max_Salivan
- Posts: 93
- Joined: Thu Dec 15, 2011 1:00 pm
Re: Place_Model Problems
Spike wrote:quake is case sensitive. use lower case.
Still doesn't work.
-

ScatterBox - Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
then you fucked up something.
All the codes posted here works for me, in qc1.06 and in scratch qc.
All the codes posted here works for me, in qc1.06 and in scratch qc.
-

drm_wayne - Posts: 232
- Joined: Sat Feb 11, 2012 5:47 pm
Re: Place_Model Problems
hmmm create a new map (just a box), put a place_model on it and test.
If didn't work copy and paste the .map file here so we can take a look.
If didn't work copy and paste the .map file here so we can take a look.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Re: Place_Model Problems
frag.machine wrote:hmmm create a new map (just a box), put a place_model on it and test.
If didn't work copy and paste the .map file here so we can take a look.
http://www.sendspace.com/file/d0xnh4 Here ya go!
-

ScatterBox - Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
LESSON LEARNED ALWAYS ADD YOUR NEWLY MADE .QC TO THE PROGS.SRC! 
-

ScatterBox - Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
Yeah, its a good idea. 
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
14 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest