Re: Grrr. Stupid bloody CoGs-Help(again)!! :P


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by Stealth on February 23, 1998 at 16:21:01:

In Reply to: Re: Grrr. Stupid bloody CoGs-Help(again)!! :P posted by Elanthil01 on February 23, 1998 at 09:04:53:

> Whoa, thanks..I thought it was something small I wasnt understanding!

> Stealth..thanks, about that NUMFRAMES setting tho..

> The reason I want the cog itself to pull ALL its information from the values set in the THING editor is to make editing a things movement simple and easy.

The idea is you should make a cog as resonably flexible as possible rather than completely fixed to doing one task. The reason is then JK only has to load one copy of the cog and link it to as many things that use this cog. If you design a cog to only work for each specific purpose it must load all of the cogs once.

There is no way to get the numframes from the world thing list that i remember,
thus you need to enter it.Besides the code i wrote is portable to 50 or a hundred frames as well as only two frames without having to modify it. It will do as you wanted endlessly loop.


> A cog pulls its FRAME data from the values FRAME set in the thing editor, so, since I build the patrol route directly onto the thing itself using JED's thing editor, It makes it very simple to just pull the number of frames from there as well.

Actualy it would be better to say the frames are attached to the thing and the cog looks up the frame info.


> IF we can make the cog work this way, this means that the SAME cog can be used WITHOUT modification in any situation...

Only if you want it to loop , i suppose it could be changed to give it a value so it will do either , but it would be easier to use two small cogs rather than a big ugly one.

> EX: move a bomber through a 50 frame patrol, which would let you attach another cog to the bomber to activate it as a 'turret' when a button is pushed in a secret area.

Thats not what i would classify as a generic type cog, that would be more of a special purpose cog.

>
> Ok..one other thing...Do I assume right that the cog you wrote requires you to move FROM frame zero, TO frame zero in a complete polygon (circle, whatever)


Yes it is a continous loop once started.only two things you need are thing and number of frames. i would have made the speed and wait nonlocal too to make it even more generic.

> I hope so hehe..

> My BIGGEST gripe so far with the cog *I* wrote (it works now..of course, I lost most of my sanity getting it there hehe) is that it moves forward through the frames, then for some bloody reason, it moves BACKWARDS through the frames even though I dont have ANY lines that tell it to do that!


> Weird, huh?

> Anyway...thanks..Im gonna go test the cog you wrote. I like it..its a lot more elegant..and SMALLER than the one I wrote too.





Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]