Inside3D!
     

add custom entities to map?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Mapping
View previous topic :: View next topic  
Author Message
Freemanoid



Joined: 16 Jun 2008
Posts: 52
Location: BELARUS

PostPosted: Thu May 14, 2009 12:49 pm    Post subject: add custom entities to map? Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
scar3crow
Inside3D Staff


Joined: 18 Jan 2005
Posts: 837
Location: Las Vegas, NV

PostPosted: Thu May 14, 2009 2:31 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
Freemanoid



Joined: 16 Jun 2008
Posts: 52
Location: BELARUS

PostPosted: Thu May 14, 2009 5:15 pm    Post subject: Reply with quote

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?
_________________
^O,..,o^
Back to top
View user's profile Send private message Visit poster's website
ceriux



Joined: 06 Sep 2008
Posts: 968
Location: Florida, USA

PostPosted: Thu May 14, 2009 5:26 pm    Post subject: Reply with quote

in worldcraft all u do is open the fgd and add it. (after you've coded it)
_________________
QuakeDB - Quake ModDB Group
Back to top
View user's profile Send private message Yahoo Messenger
MeTcHsteekle



Joined: 15 May 2008
Posts: 397
Location: its a secret

PostPosted: Thu May 14, 2009 5:28 pm    Post subject: Reply with quote

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
_________________
bah
Back to top
View user's profile Send private message AIM Address
ceriux



Joined: 06 Sep 2008
Posts: 968
Location: Florida, USA

PostPosted: Thu May 14, 2009 5:31 pm    Post subject: Reply with quote

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.
_________________
QuakeDB - Quake ModDB Group
Back to top
View user's profile Send private message Yahoo Messenger
Freemanoid



Joined: 16 Jun 2008
Posts: 52
Location: BELARUS

PostPosted: Fri May 15, 2009 7:58 am    Post subject: Reply with quote

Ok. But what is fgd? Progs.dat? Or something else?
_________________
^O,..,o^
Back to top
View user's profile Send private message Visit poster's website
Spirit



Joined: 20 Nov 2004
Posts: 476

PostPosted: Fri May 15, 2009 8:05 am    Post subject: Reply with quote

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?
_________________
Quake Maps
Back to top
View user's profile Send private message Visit poster's website
avirox



Joined: 16 Aug 2006
Posts: 109

PostPosted: Fri May 15, 2009 11:38 am    Post subject: Reply with quote

EntEd (full version) will do the trick fairly well if you don't need to actually see your map while editing stuff.
Back to top
View user's profile Send private message
MauveBib



Joined: 04 Nov 2004
Posts: 602

PostPosted: Fri May 15, 2009 3:56 pm    Post subject: Reply with quote

All map editors allow you to edit the fields of an entity, in order to set spawnflags, targets etc. Just place any old entity then edit the "classname" field to whatever custom entity you want to use.
_________________
Apathy Now!
Back to top
View user's profile Send private message
Freemanoid



Joined: 16 Jun 2008
Posts: 52
Location: BELARUS

PostPosted: Fri May 15, 2009 4:32 pm    Post subject: Reply with quote

Ok, Thanks Very Happy
I use Quark
_________________
^O,..,o^
Back to top
View user's profile Send private message Visit poster's website
Freemanoid



Joined: 16 Jun 2008
Posts: 52
Location: BELARUS

PostPosted: Sat May 16, 2009 1:59 pm    Post subject: Reply with quote

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.
_________________
^O,..,o^
Back to top
View user's profile Send private message Visit poster's website
c0burn



Joined: 05 Nov 2004
Posts: 158
Location: Liverpool, England

PostPosted: Sat May 16, 2009 2:04 pm    Post subject: Reply with quote

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 ();
};
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
frag.machine



Joined: 25 Nov 2006
Posts: 728

PostPosted: Sat May 16, 2009 4:58 pm    Post subject: Reply with quote

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.
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/
Back to top
View user's profile Send private message Visit poster's website
Freemanoid



Joined: 16 Jun 2008
Posts: 52
Location: BELARUS

PostPosted: Sat May 16, 2009 5:43 pm    Post subject: Reply with quote

Yipeee! It's working now!
BIG THANK's to frag.machine and other's Very Happy

But now I have some problems with model - I can walk trough it .
_________________
^O,..,o^
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Mapping All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group