PDA

View Full Version : PotW


[SF]pjb
11-25-2003, 06:22 AM
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!
http://hometown.aol.co.uk/Pokejoyboy/jshot011.jpg
http://hometown.aol.co.uk/Pokejoyboy/jshot013.jpg

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.

# 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

http://hometown.aol.co.uk/Pokejoyboy/jshot030.jpg
http://hometown.aol.co.uk/Pokejoyboy/jshot033.jpg

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 (http://www.geocities.com/SF_PJB1)

-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

EH_AceCSF
11-25-2003, 07:02 AM
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
11-25-2003, 07:32 AM
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 (http://www.geocities.com/SF_PJB1)

-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

[SF]pjb
11-25-2003, 07:38 AM
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?


# 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 (http://www.geocities.com/SF_PJB1)

-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).]

Hell Raiser
11-25-2003, 07:41 AM
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 (http://www.hellraiser64.com/tdir)

[SF]pjb
11-25-2003, 09:21 AM
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 (http://www.geocities.com/SF_PJB1)

-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

Hell Raiser
11-25-2003, 10:51 AM
I've no idea off the top of my head, but you can find out by looking at force_lightning.cog http://forums.massassi.net/html/smile.gif

------------------
-Blessed Be-
I know it's the last day on earth,
We'll be together while the planet dies.
DBZ: The Destruction is Real (http://www.hellraiser64.com/tdir)