It has been about 2/3 months I'm seriously digging on other peoples code and something from scratch I made but I still have a lot of doubts on basic concepts of quakec
What is self? When use other? When use owner?
I made an example. If I want to make a monster I wrote
Code: Select all
void() mymonster = {
self.classname = "mymonsterclassname"; //so self is the monster, no problem
setmodel (self,"monsters/mymonster.iqm"); //no problem either. self is the entity "subject" of the model initialization
//and so on....
}
on the quakec specification I found this:
So, if I understood well, self,other and owner are the "pillars" of quakec entity programming.6.2 Definition of entity fields
These are the fields that are available in the entity objects (like self, other). Beware that this is not true object oriented programming: there is no protection when accessing those fields, and no guaranty on the validity of values. So if you put garbage there you will probably crash the game.
There's anyone who can tell me if there's a thorough guide on how to use the entity fields? Because I can't tell quakec to "link" 2 entities to each others, for example to simulate a dog follows its owner, or two distint objects that fall together, etc.
Thanks in advance guys