I probably should've combined this with the vector topic I posted 3 days ago, but too late now
.
Anyhoo, I was reading the tutorials in the Datamaster just after 061 was released, and I found something I had never heard before concerning templates and cogs.
Now, is the italics part about adding the cog in the cogscripts section actually necessary? It seems to work exactly the same w/o doing that. And if it IS necessary, please explain why.
Thanks.
------------------
Bond, Power, CA, The Force, Saber, IC, Epic, Oily Mexican Food, BG, /\ |> /\ /\/\, Sentences.
Now you know where I've been.
![http://forums.massassi.net/html/rolleyes.gif [http://forums.massassi.net/html/rolleyes.gif]](http://forums.massassi.net/html/rolleyes.gif)
Anyhoo, I was reading the tutorials in the Datamaster just after 061 was released, and I found something I had never heard before concerning templates and cogs.
Quote:
<font face="Verdana, Arial" size="2">From the DM tutorials, Chapter 2 - Writing Cogs:
... Let's go ahead and create our weapon template. Open up the static.jkl and paste this text at the end:
Section: templates
World templates 2
_base none orient=(0/0/0) type=weapon collide=1 move=physics thingflags=0x400 timer=10 mass=5
+grapple _base model3d=mana1.3do vel=(0/8/0) cog=class_grapple.cog typeflags=0x180
end
The first template in a jkl must be a base template because JK doesn't allow cogs to use the first template - the reason is unclear. So we'll make the first template a base for our +grapple template. When JK loads these templates, weap_bryar will be able to create grappling hooks in the game from them. For us, the most important part of this template is its class cog (class_grapple.cog) - which we'll write shortly. Now go up to the cogscripts section and add an entry for class_grapple.cog.
Section: cogscripts
World scripts 51
0: class_grapple.cog
end
Remember to up both the cogscripts and cogs counts. Now we're ready to start writing the cog that will do all of the work...</font>
... Let's go ahead and create our weapon template. Open up the static.jkl and paste this text at the end:
Section: templates
World templates 2
_base none orient=(0/0/0) type=weapon collide=1 move=physics thingflags=0x400 timer=10 mass=5
+grapple _base model3d=mana1.3do vel=(0/8/0) cog=class_grapple.cog typeflags=0x180
end
The first template in a jkl must be a base template because JK doesn't allow cogs to use the first template - the reason is unclear. So we'll make the first template a base for our +grapple template. When JK loads these templates, weap_bryar will be able to create grappling hooks in the game from them. For us, the most important part of this template is its class cog (class_grapple.cog) - which we'll write shortly. Now go up to the cogscripts section and add an entry for class_grapple.cog.
Section: cogscripts
World scripts 51
0: class_grapple.cog
end
Remember to up both the cogscripts and cogs counts. Now we're ready to start writing the cog that will do all of the work...</font>
Now, is the italics part about adding the cog in the cogscripts section actually necessary? It seems to work exactly the same w/o doing that. And if it IS necessary, please explain why.
Thanks.
------------------
Bond, Power, CA, The Force, Saber, IC, Epic, Oily Mexican Food, BG, /\ |> /\ /\/\, Sentences.
Now you know where I've been.
May the mass times acceleration be with you.