add custom entities to map?
Moderator: InsideQC Admins
17 posts
• Page 1 of 2 • 1, 2
add custom entities to map?
How can I add custom entities to my map? Maybe I need to modify engine code of map editor? Or I have another way? It's all going to be happening in original quake for ppc.
- Freemanoid
- Posts: 52
- Joined: Mon Jun 16, 2008 11:25 am
- Location: BELARUS
It depends on the map editor you're using, I'm only familiar with GTKRadiant, in that case you're adding an existing entity, and then going into the properties and changing the entity name, and its fields.
...and all around me was the chaos of battle and the reek of running blood.... and for the first time in my life I knew true happiness.
-

scar3crow - InsideQC Staff
- Posts: 1054
- Joined: Tue Jan 18, 2005 8:54 pm
- Location: Alabama
Ok, so i need a gtkradiant? I can use any map editor.
If you know how to add new entity in gtkradiant, can you tell me how?
If you know how to add new entity in gtkradiant, can you tell me how?
^O,..,o^
- Freemanoid
- Posts: 52
- Joined: Mon Jun 16, 2008 11:25 am
- Location: BELARUS
i do the same with QuArK
just drop in, say a monster_wizard if its a flying enemy, go to is options or it might be called sicifics and so there should be something in somewhere [eh?] where it has a read out if its flags nad name and shit like that, you just change the name from monster_wizard to monster_moncodename and blammo! it will be there [giving that you have the progs.dat and etc there
...im sure this made no sense possibly
..edit: just listen to Cerv hes worldcraftian i guess
just drop in, say a monster_wizard if its a flying enemy, go to is options or it might be called sicifics and so there should be something in somewhere [eh?] where it has a read out if its flags nad name and shit like that, you just change the name from monster_wizard to monster_moncodename and blammo! it will be there [giving that you have the progs.dat and etc there
...im sure this made no sense possibly
..edit: just listen to Cerv hes worldcraftian i guess
bah
- MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
MeTcHsteekle wrote:i do the same with QuArK
just drop in, say a monster_wizard if its a flying enemy, go to is options or it might be called sicifics and so there should be something in somewhere [eh?] where it has a read out if its flags nad name and shit like that, you just change the name from monster_wizard to monster_moncodename and blammo! it will be there [giving that you have the progs.dat and etc there
...im sure this made no sense possibly
..edit: just listen to Cerv hes worldcraftian i guess
same thing ur sayin man. it should all work the same if not similar. just code your entity then compile your mod. add it to the fgd load up your editor and it should be in your entity list.
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
fgd is the file some editor (I guess Worldcraft) gets the entity information from.
You can use custom entities with ANY decent editor I know of, without having to go through such strains. What editor do you use?
You can use custom entities with ANY decent editor I know of, without having to go through such strains. What editor do you use?
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
- Spirit
- Posts: 1031
- Joined: Sat Nov 20, 2004 9:00 pm
damn, it doesn't working. Maby I doing something wrong?
Ok, here is my code for object computer :
void() SpawnComputer =
{
local entity computer;
computer = spawn();
computer.classname = "object_computer";
computer.think = ObjectComputer;
computer.nextthink = time + 0.1;
};
void() ObjectComputer =
{
precache_model ("progs/computer.mdl");
setmodel(self, "progs/computer.mdl");
setorigin(self, self.origin);
self.solid = SOLID_NOT;
setsize (self, '-16 -16 0', '16 32 40');
};
In field "classname" I past "object_computer" (in Quark).
Then I compile map. And when I run it in quake, there is no such object.
Ok, here is my code for object computer :
void() SpawnComputer =
{
local entity computer;
computer = spawn();
computer.classname = "object_computer";
computer.think = ObjectComputer;
computer.nextthink = time + 0.1;
};
void() ObjectComputer =
{
precache_model ("progs/computer.mdl");
setmodel(self, "progs/computer.mdl");
setorigin(self, self.origin);
self.solid = SOLID_NOT;
setsize (self, '-16 -16 0', '16 32 40');
};
In field "classname" I past "object_computer" (in Quark).
Then I compile map. And when I run it in quake, there is no such object.
^O,..,o^
- Freemanoid
- Posts: 52
- Joined: Mon Jun 16, 2008 11:25 am
- Location: BELARUS
Well you haven't coded anything called "object_computer".
SOLID_NOT is probably a problem too. You probably don't need to reinvent the wheel too much, use the handy StartItem code already in items.qc!
Try putting this at the bottom of items.qc, and removing your code so far...
void() computer_touch =
{
if (!other.flags & FL_CLIENT)
return;
if (time < self.radtime)
return;
self.radtime = time + 1;
sprint(other, "What's up bitches!\n");
};
void() object_computer =
{
self.touch = computer_touch;
precache_model ("progs/computer.mdl");
setmodel (self, "progs/computer.mdl");
setsize (self, '-16 -16 0', '16 32 40');
StartItem ();
};
SOLID_NOT is probably a problem too. You probably don't need to reinvent the wheel too much, use the handy StartItem code already in items.qc!
Try putting this at the bottom of items.qc, and removing your code so far...
void() computer_touch =
{
if (!other.flags & FL_CLIENT)
return;
if (time < self.radtime)
return;
self.radtime = time + 1;
sprint(other, "What's up bitches!\n");
};
void() object_computer =
{
self.touch = computer_touch;
precache_model ("progs/computer.mdl");
setmodel (self, "progs/computer.mdl");
setsize (self, '-16 -16 0', '16 32 40');
StartItem ();
};
- c0burn
- Posts: 208
- Joined: Fri Nov 05, 2004 12:48 pm
- Location: Liverpool, England
The custom entity "classname" value in the map MUST match EXACTLY the entity spawn function in your QC. So, either rename the entity spawn function to "object_computer" OR change the "classname" value to "ObjectComputer" and things must work as expected.
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
Yipeee! It's working now!
BIG THANK's to frag.machine and other's
But now I have some problems with model - I can walk trough it .
BIG THANK's to frag.machine and other's
But now I have some problems with model - I can walk trough it .
^O,..,o^
- Freemanoid
- Posts: 52
- Joined: Mon Jun 16, 2008 11:25 am
- Location: BELARUS
17 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest
