Game Development Community

finding a line in the console.

by rennie moffat · in Torque Game Builder · 05/26/2010 (10:26 am) · 8 replies

Hi guys I am better trying to understand the echo call and if it is useful with figuring out or finding, info in the console log as I check for various updates? See, I need to find the instance I collide with an object, upon collision, I turn off collisions then reset them. So, it will be one line in thousands. Is there a way I can find it with out scrolling hopelessly?





Thanks.



:::((()))

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.


#1
05/26/2010 (10:31 am)
Open the console.log in a text editor like Notepad++ and find it there.
#2
05/26/2010 (10:35 am)
Really? Where do I find the console.log to open?
As in where is the file? Do I need to quit the game when I make the correct collision? So it is "marked"?











#3
05/26/2010 (11:22 am)
Hey I have a question....


I found everything and I am liking the results for sure, but maybe you can answer this David, or anyone but...

I have a question.

1. I echo my contacts and object.class. I have returns on the collisions and none on the object. Peculiar, but not important right now. what is is that after a collision, I presume as it switches to no contacts but the return of an object class. Further it is a number "-1.424", not a word that is returned. It should be "tsClass", if anything.





:::))((
#4
05/26/2010 (12:49 pm)
EDITING::::


HI there, Dave, I actually made that post twice in that it automatically deleted the first attempt, as a result wrote above, not as effectively. But I do have a very well thought out question. Perhaps as I worded it it did not seem as meaningful as the original post was... any how no worries. but...


I want to observe what the contact and normal points are as well as what the object.class is on Collision with my player. In read back I get a number for my %object.class = "-1.401". this is odd, the only thing it should read is "tsClass".

Also, when I get a class returned "-1.401" I get no collisions or or normal returned, but when i get no object.class returned i get contact and normals returned.



Anyhow, that is about it.


I hope that explains it a bit better cause I am really looking for some help on this little tidbit.


Thanks.




#5
05/26/2010 (1:33 pm)
Quote:
In read back I get a number for my %object.class = "-1.401". this is odd, the only thing it should read is "tsClass".

Usually when I get an unpredictable value in one of the return values it's because I did something stupid in one of the arguments in the callback argument listing.

I did something like this:
function t2dSceneObject::onCollision(%srcObj, %dstObjasdfase, %srcRef, %dstRef, %time, %normal, %contactCount, %contacts)  
{  
  //put collision code here.
}
but it should be like this:
function t2dSceneObject::onCollision(%srcObj, %dstObj, %srcRef, %dstRef, %time, %normal, %contactCount, %contacts)  
{  
  //put collision code here.
}
#6
05/26/2010 (2:06 pm)
edit:

ok. Ill go with that Roller Jesus, ...

as I say my message may have been a bit garbled Anyhow, As I say I have 2 mysteries on my hand. A and B.



No worries tho, I do have a quick question that you may be able to answer. If, in my players onUpdate I cast a collision from the owner, a 4 sided object. If it collides with another 4 sided object how many possible combinations of a normal (x and y) could it have?

I ask since I am using cast collision in my players on update, if normals x and y equal something specific a visual reaction occurs. My player reacts. I ask because sometimes my player does not react, a fairly complex reaction. placing an object, switching layers of another and setting a schedule.


cheers



#7
05/27/2010 (9:27 am)
I've never really used castCollision, so I don't want to give you bad advice but I did do some searching and saw a post of your where Mike Lilligreen explained it pretty well.

Give a little search through your past posts.
#8
05/27/2010 (9:52 am)
yah no problem. I have it sorted and i apologize for the garbled posts but as i say I had to rewrite my post (second or third. It had a clear message originally but I turn off my airport (mac internet) because with it off, reloading a tgb project takes nanoseconds. When it is on it takes mega minutes. anyhow, so i kept on trying to repeat what I had written at that point I was just spinning wheels.

I have since found the answer. Interestingly enough, for a 4 sided object colliding with a 4 sided object, I get 8 possible normal(including x & y for each) results. Not 4. Interesting but I think this is why I had, as I say previously not been getting the results, in game play as I wanted, expected.
;


Thanks tho.


Keep on truckin!