Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → 3do obstacle clips through player instead of pushing :(
3do obstacle clips through player instead of pushing :(
2003-11-01, 8:14 PM #1
I have a huge spinning blade obstacle in the level I'm working it. I had in mind for it to knock you out of the way if you ran into it, but all it does is clip right through me. I have the 3do set to _structure, so it's suppose to be solid (I can step on some parts of it). Whats the prob? Can this be solved with a cog?

------------------
Schenectady Crispies are so freakin good they taste twice! Once in your mouth, and once in your esophagus.
I hope I don't get caught! TM
Lyrics are highly overrated.
2003-11-02, 6:06 AM #2
How is the blade spinning? Through key, or angvel in the template. I would say angvel is the best usage here. And if you have _struct as a parent, then you won't be able to satnd on it (without the right flags). You'll just slip off.
OK... This is basically what what I can come up with for now. Need any more help? Please elaborate!
Edward's Cognative Hazards
2003-11-02, 12:27 PM #3
This screen shot might elaborate...
[http://www.phoenixknights.net/misc/ts-spinning01.jpg]
This is a racing level and the blades are one of the many obstacles.

The 3do's parent is _structure. I'm using a cog to make them rotate...
Code:
symbols
message	startup

thing	elevator	desc=elevator_object
flex	speed=2.0	desc=movement_speed
end

#COG code section
code

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

startup:
	while (1) {
		movetoframe(elevator, 1, speed);
		waitforstop(elevator);
		movetoframe(elevator, 0, speed);
		waitforstop(elevator);
	}
end


Right now the only way they stop you is if you run right into one. If you run in front of the blade and it swings and hits you, it does nothing but clip through you.

------------------
Schenectady Crispies are so freakin good they taste twice! Once in your mouth, and once in your esophagus.
I hope I don't get caught! TM
Lyrics are highly overrated.
2003-11-02, 12:43 PM #4
You can try using angVel, but I think it requires spherical collision to work properly, but I forget.

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-11-02, 4:13 PM #5
rollin' rollin' rollin' ....k I'll shut up now -_-

------------------
O_o
o_O
"Jayne, this is something the Captain has to do for himself"

"N-No it's not!"

"Oh."
2003-11-02, 10:24 PM #6
Hi there [http://forums.massassi.net/html/smile.gif]

Well ... just a couple of pointers, so here we go [http://forums.massassi.net/html/wink.gif] :

1.) That COG script won't run for a couple of reasons - no "return;" statement at the end of the start-up message for one, not to mention that the while test (the value in brackets), has not been defined - give that value a variable name ("int" data-type) in the symbols section, so that you can more accurately test the script.

2.) I know it sounds daft, but I have to ask: have you made sure that the 3do is in the correct sector (ie - it's own sector)?

3.) Why not use (or certainly cross-check) the multi-player blades of death level, that comes as part of the standard game, for its template setting... ?

Just a couple of thoughts - hope these have helped [http://forums.massassi.net/html/biggrin.gif]. I'll post back, if I have any other thoughts...

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-11-03, 3:38 AM #7
1) This isn't the rolling mod [http://forums.massassi.net/html/wink.gif]

2) The cog script does work. The varables are defined in JED.

3) The 3do is within the sector.

4) Blades of Death was the first thing I checked, but I didn't understand how it was rotating. The only cog associated with it is m5_dandamage.cog. This cog just allows the blade to stop when flip a switch and it kills you if you touch the blade while it's spinning. What is causing this blade to spin?

------------------
Schenectady Crispies are so freakin good they taste twice! Once in your mouth, and once in your esophagus.
I hope I don't get caught! TM
Lyrics are highly overrated.
2003-11-03, 5:11 AM #8
From the further little snippets we've gleaned so far:

1.) I believe I'm pretty safe in saying that this is now definitely a template issue, in which case, read the other posts by the editors who have commented so far (angVel factor etc).

2.) I'm telling you now - whether you choose to believe/listen to me is entirely your choice - but in COG scripting, no "return" statement == no run/script execution. Admittedly, there is one (and only one) exception, but this script does not present this case exception. Trust me on this - I may not be the best cogger, when compared with GBK and SaberMaster, but I can more than hold my own, knowledge wise. Just because you have the variable values filled in in JED, does NOT mean that that the cog script should automatically work... If you still don't believe me, run the COG quickly through SaberMaster's "Parsec" program - I think it will concur with what I've mentioned.... [http://forums.massassi.net/html/redface.gif] [http://forums.massassi.net/html/wink.gif]

Anyways - sorry to be a bit ranty (long day at the office). Hope this helps [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-11-03, 6:09 AM #9
Actully, LJ, 'returns' are NOT required. At all. Heck, I havent written a cog using 'return' in over 2 years. I use 'stop', but even that isnt needed.

All the return does is tell JK to stop executing the current message, and 'return' to the last one it was doing before this message got called . . . or in other words, to go back to what it was doing before the new message was called.


Raven's cog works without a return because the Startup message never stops being executed. The while loop is infinite. In Cog, the easiest wasy to make an ininifte loop is with "While(1) {}". The problem with that, of course, is that it never stops. And if your not careful, it can vary easily cause JK to freeze up.

And another thing, not every variable need be defined in the symbols section. You can dynamically create and assign variables incog. Infact, this is a quick and dirty was to pass data from one level to another in an SP series.


Raven: Ditch the cog, ditch the frames. Switch over to 'angvel' template value. You should also set the parent to 'walkstruct'.


Emon: No, angvel does not need sphere collision to work right.

------------------
Fight the future.
And when the moment is right, I'm gonna fly a kite.
2003-11-03, 11:09 AM #10
Well that's why I did point out that "return" was not "always" necessary, but more good practice than anything else (and although not an OO language (not by a long shot lol [http://forums.massassi.net/html/wink.gif]) ), it is a good practice to be able to logically follow the program flow... Structurally speaking the cog is incomplete without the "return". Sure it may run without it, but... I appreciate that this may not be the best expressed point I've ever made, but alas - fatigue strikes [http://forums.massassi.net/html/wink.gif] [http://forums.massassi.net/html/redface.gif]

I also totally agree with you about the while loop never reaching a break point, with the outcome being JK freezes up. Moral of the story - by all means use "while" loops, but treat with caution...

And with the variables - I believe it's because JK's COG language syntax checking is so poor that it lets you get away with the lack of variable declaration - with true OO languages (not any of that VB waffle, but like C/C++ or Java (no I'm not having a dig at your cogpad *wink wink, nudge nudge*) [http://forums.massassi.net/html/wink.gif] lol ), they don't compile unless everything has been defined or declared that is going to be used.

I guess what I'm saying is that for a very long time, I used the "quick n' dirty" approach for COG variables, but it doesn't pay to get into bad habits, what with a large number of Massassians aspiring to learn other/new programming languages. I'm merely attempting to help budding coggers build on what they know with solid foundations, rather than trying to build castles on sand... [http://forums.massassi.net/html/wink.gif]

But to actually relate to the post ( [http://forums.massassi.net/html/wink.gif]), take GBK's advice, Raven [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... [http://forums.massassi.net/html/wink.gif]

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

[This message has been edited by lucky_jackpot (edited November 03, 2003).]
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-11-03, 11:27 AM #11
Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Emon: No, angvel does not need sphere collision to work right.</font>


You're right, it was force throwable objects that I had that issue with, they wouldn't collide unless it was spherical.

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-11-03, 12:02 PM #12
Way to cover your ***, LJ. [http://forums.massassi.net/html/tongue.gif]


Oh, and I dont really consider VB to be a real programming language either....

------------------
Fight the future.
And when the moment is right, I'm gonna fly a kite.
2003-11-03, 12:25 PM #13
LOL

Hey - who's counting GBK [http://forums.massassi.net/html/wink.gif] [http://forums.massassi.net/html/cool.gif] lol

It's only natural, that it's the program language's fault, and not mine [http://forums.massassi.net/html/tongue.gif] [http://forums.massassi.net/html/biggrin.gif]. That just wouldn't be conceivable [http://forums.massassi.net/html/tongue.gif]

Still - I think (hope) you'll agree - there are a few valid points that I've made... [http://forums.massassi.net/html/wink.gif]

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-11-03, 4:54 PM #14
Thank you for your help everyone. Unfortunately, I'm not very familar with template varables. I deleted the frames and cog and tried to modify the template, but now it's not rotating at all. Any ideas?

Code:
# DESC: Spinning Blade Obstacle
# BBOX: -2.3 -.49 -.5 2.3 .51 .5
uberBlade02       _walkstruct        size=2.393844 movesize=2.393844 model3d=blade02.3DO maxrotvel=90.000000 angvel=(0.000000/90.000000/0.000000)


------------------
Schenectady Crispies are so freakin good they taste twice! Once in your mouth, and once in your esophagus.
I hope I don't get caught! TM
Lyrics are highly overrated.
2003-11-03, 8:52 PM #15
For one thing, you dont need all those trailing zeros in your angle decleration. They just clutter everything up. The template will work just as fine with NO trailing zeros.

Second, the EASIEST way to do a quick spinning object, is just modify an existing one.

Code:
# DESC: 
# BBOX: -.38 -.38 -.03 .38 .38 .03
fan0a             10fanfast          size=.382543 movesize=.382543 model3d=ots2_fan0a.3DO angvel=(0/500/0)



Thats the template for the huge spinning fans in OTS2. All I had to do was change the direction and speed of the spin....

------------------
Fight the future.
And when the moment is right, I'm gonna fly a kite.
2003-11-04, 7:29 PM #16
Thanks for the good info GBK. The blade is now spinning [http://forums.massassi.net/html/smile.gif]

Unfortunately, it's still not pushing the player out of the way, it just clips right through me. The only way it stops me is if I run right into the front of it. Weird.

Oh well, I guess I should just live with it.

------------------
Schenectady Crispies are so freakin good they taste twice! Once in your mouth, and once in your esophagus.
I hope I don't get caught! TM
Lyrics are highly overrated.
2003-11-04, 7:37 PM #17
Collision in JK isnt perfect . . . infact it downright sucks. Youve problably just hit JKs limit in this area. You could try to find a workaround, but it wont be pretty.


Hmm, you could try fiddling with the collidesize setting...

------------------
Fight the future.
And when the moment is right, I'm gonna fly a kite.
2003-11-06, 3:27 AM #18
For angvel=() to work properly, I'm pretty sure you need move=physics in your template.

------------------
-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
2003-11-07, 1:45 PM #19
And perhaps there are Size and MoveSize errors? I'm thinking that MoveSize specifically could be too small a number, but I'm probably be wrong.

------------------
His pot is blacker than his kettle!

Phoenix Swords
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2003-11-07, 4:43 PM #20
The current move and movesize are what the "Quick & Dirty" template creator came up with. I've tried doubling those stats to no avail. Additionally, move=physics had no effect.

Very weird. I'm thinking the movesize/move have to be correct because I can colide with the very front of the blade, but once I move inside the blades path it just passes right through me.

This project is nearing early beta stages. When I select beta testers, maybe they'll be able to spot the problem.

Thanx again for looking into this problem everyone.
Lyrics are highly overrated.
2003-11-07, 5:00 PM #21
Quote:
<font face="Verdana, Arial" size="2">Originally posted by MrRavenX:
...I can colide with the very front of the blade, but once I move inside the blades path it just passes right through me....</font>


This is, AFAIK, a limitation of JK's collision system. There is no known fix.

------------------
Fight the future.
And when the moment is right, I'm gonna fly a kite.
2003-11-08, 12:57 AM #22
hodl up.. has he tryed collide=3? i know collide 1 is sphear colltion, and as we all know that sucks..

if you edit all the 3do's surfaces in JOKe to ahve the collides flag, and then set the templates collide=3 it might be better...

if you have allready tryed that and i missed it dont blame me..

------------------
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?

↑ Up to the top!