The Massassi Temple: Forums  

Go Back   The Massassi Temple: Forums > Editing Forums > Cog Forum

Reply
 
Thread Tools Rate Thread
Title: PotW
[SF]pjb is offline [SF]pjb
Registered User
PotW | Old Posted: 11-25-2003, 06:22 AM #1
Reply With Quote

nope not pic of the week, PROBLEMS of the week. thats right PJB has gone and made more porblmes for himself.. but who can fix them.. and will they be able to next week...
so lets find out. in the newset exiteing installment of.. The PJB Files..

ok, here are problems.
firstly i have tryed to replace lighting with a flat 2D 3do that should eminate from the player and repeate, if any one has played red alert 2 yuris revenge, you know what i want is somethign similar to the magnetron tank.

but when i do it. i get this!



why dont the 3do sections go in a strait line.. and how do i fix them?

on a ligher note. (thats a joke.) i ahve made my first cog that uses a sec0[i] thing.. and it works. allmost.. the code and two screenshots are below. followed by the problem.
Code:
# Jedi Knight Cog Script
#
#
# [PJB]
#
# nice cog for lighting bespin.

symbols
sector	sect0		desc=sector_to_change
sector	sect1		desc=sector_to_change
sector	sect2		desc=sector_to_change
sector	sect3		desc=sector_to_change
sector	sect4		desc=sector_to_change
sector	sect5		desc=sector_to_change
sector	sect6		desc=sector_to_change
sector	sect7		desc=sector_to_change
sector	sect8		desc=sector_to_change
sector	sect9		desc=sector_to_change
sector	sect10		desc=sector_to_change
sector	sect11		desc=sector_to_change
sector	sect12		desc=sector_to_change
sector	sect13		desc=sector_to_change
sector	sect14		desc=sector_to_change
sector	sect15		desc=sector_to_change
sector	sect16		desc=sector_to_change
sector	sect17		desc=sector_to_change
sector	sect18		desc=sector_to_change
sector	sect19		desc=sector_to_change
sector	sect20		desc=sector_to_change

int	i=0	local
flex	rip=1
int	numsec
message	startup		
message pulse
flex	a=0	local
end

# COG Section
code

//-----------------------------------------------------------------------------

startup:
setpulse(rip);
return;

pulse:
for(i=0; i<=numsec; i=i+1)
{
a=i/numsec;
		setsectorlight(sect0[i], a, rip/numsec);
		sleep(rip/numsec);
		setsectorlight(sect0[i], 0.0, rip);
}
return;
end



the cog (as you can see) is ment to move the sector lights down through several sectors. and when it reaches the bottem go to the top and start again...

but it seems to miss out sectors in parts of its run, and the last sector (in my case sec17) is allways on full lighting.

(note my use of a=i/numsecs, thats sheer genius. now the light realy looks liek its comeing down from way up high!)

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior
____________
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
 
EH_AceCSF is offline EH_AceCSF
Registered User
Old Posted: 11-25-2003, 07:02 AM #2
Reply With Quote

sleep(rip/numsec);
This line is strange for me. Why should it sleep rip/numsec? This means that it will remove lighting some time before next pulse..

------------------
The miners of Kiith Somtaaw sacificed much, and risked all. For their efforts they were brought into the inner most circle of Hiigaren power. Naabal, S'jet, and Sobanii bowed before them. And from that day to this, Somtaaw's children have been known to one and all as Beastslayers..
 
[SF]pjb is offline [SF]pjb
Registered User
Old Posted: 11-25-2003, 07:32 AM #3
Reply With Quote

thats a intresting point... it could have something to do with it..

but shurely the hold point is that if its RIP/numsec then it will only sleep for one numsec of the pulse..

so if my pulse is every second

and i ahve four sectors

then it will sleep four one fourth of the second.

and as the for loop will run four times it will end the moment the new pulse starts...

mut jsut encase, ill have a look at useing a timer insted..

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior
____________
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
 
[SF]pjb is offline [SF]pjb
Registered User
Old Posted: 11-25-2003, 07:38 AM #4
Reply With Quote

i dont know What you ment by your post, BUT IT WORKED!, the below code replaces teh pulse witha timer. and now the lights move PERFECTLY! EH_aceCSF. thank you! i owe you one..


now, any ideas on the lighting warp gun thing of doom?

Code:
# Jedi Knight Cog Script
#
#
# [PJB]
#
# nice cog for lighting bespin.

symbols
sector	sect0		desc=sector_to_change
sector	sect1		desc=sector_to_change
sector	sect2		desc=sector_to_change
sector	sect3		desc=sector_to_change
sector	sect4		desc=sector_to_change
sector	sect5		desc=sector_to_change
sector	sect6		desc=sector_to_change
sector	sect7		desc=sector_to_change
sector	sect8		desc=sector_to_change
sector	sect9		desc=sector_to_change
sector	sect10		desc=sector_to_change
sector	sect11		desc=sector_to_change
sector	sect12		desc=sector_to_change
sector	sect13		desc=sector_to_change
sector	sect14		desc=sector_to_change
sector	sect15		desc=sector_to_change
sector	sect16		desc=sector_to_change
sector	sect17		desc=sector_to_change
sector	sect18		desc=sector_to_change
sector	sect19		desc=sector_to_change
sector	sect20		desc=sector_to_change

int	i=0	local
flex	rip=1
int	numsec
message	startup		
message timer
flex	a=0	local
end

# COG Section
code

//-----------------------------------------------------------------------------

startup:
settimer(rip);
return;

timer:
for(i=0; i<=numsec; i=i+1)
{
a=i/numsec;
		setsectorlight(sect0[i], a, rip/numsec);
		sleep(rip/numsec);
		setsectorlight(sect0[i], 0.0, rip);
}
settimer(rip);
return;
end
------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior

[This message has been edited by [SF]pjb (edited November 25, 2003).]
____________
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
 
Hell Raiser is offline Hell Raiser
Villianous Demon Coder
Old Posted: 11-25-2003, 07:41 AM #5
Reply With Quote

The lighting template has it set up so that the pieces are randomly angled and connected, this is why it's messing up for you.

------------------
-Blessed Be-
I know it's the last day on earth,
We'll be together while the planet dies.

DBZ: The Destruction is Real
____________
-Hell Raiser
 
[SF]pjb is offline [SF]pjb
Registered User
Old Posted: 11-25-2003, 09:21 AM #6
Reply With Quote

realy? that makes sence....

can you point out what line? as i aint the best with templates!

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior
____________
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
 
Hell Raiser is offline Hell Raiser
Villianous Demon Coder
Old Posted: 11-25-2003, 10:51 AM #7
Reply With Quote

I've no idea off the top of my head, but you can find out by looking at force_lightning.cog

------------------
-Blessed Be-
I know it's the last day on earth,
We'll be together while the planet dies.

DBZ: The Destruction is Real
____________
-Hell Raiser
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:55 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.