Place_Model Problems
-
- Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
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.
Re: Place_Model Problems
Code: Select all
void() place_model =
{
precache_model (self.model);
setmodel (self, self.model);
self.skin = self.skin;
};
-
- Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
Didn't work.. :/drm_wayne wrote:Code: Select all
void() place_model = { precache_model (self.model); setmodel (self, self.model); self.skin = self.skin; };
Re: Place_Model Problems
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.ScatterBox wrote:Didn't work.. :/drm_wayne wrote:Code: Select all
void() place_model = { precache_model (self.model); setmodel (self, self.model); self.skin = self.skin; };
-
- Posts: 96
- Joined: Thu Dec 15, 2011 1:00 pm
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
-
- Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
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. :Max_Salivan wrote:maybe wrong key and value parameters or model name?)
key: model
Value: progs/Quake.mdl
try mineCode: 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; };
-------------------------------------
'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
---------------------------------------------------
-
- Posts: 96
- Joined: Thu Dec 15, 2011 1:00 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
-
- Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
Still doesn't work.Spike wrote:quake is case sensitive. use lower case.
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.
-
- Posts: 2126
- Joined: Sat Nov 25, 2006 1:49 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)
-
- Posts: 50
- Joined: Sun Oct 13, 2013 7:53 pm
Re: Place_Model Problems
http://www.sendspace.com/file/d0xnh4 Here ya go!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.
-
- 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!
-
- Posts: 2126
- Joined: Sat Nov 25, 2006 1:49 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)