Scripts Are Not Running![SOLVED]
by CharlesL · in iTorque 2D · 01/06/2012 (4:56 pm) · 16 replies
As I mentioned in my last thread, I've been porting a file from Torque 2D to iTorque 2D. I had a few problems with scripts especially. My objects ported over fine, but my scripts do not run. I put them in my scripts folder, execed them into the main.cs file, checked to make sure the .dso where generated and gave my objects the correct classes. This all worked fine, but my scripts do not run!
I don't believe that the language changes from engine to engine. And if it did change slightly for iTorque, I would have gotten an error.
Please Help!
Thanks,
CharlesL
I don't believe that the language changes from engine to engine. And if it did change slightly for iTorque, I would have gotten an error.
Please Help!
Thanks,
CharlesL
#2
2. I'm trying to port 10 scripts.
3. Standard scripts.
01/07/2012 (5:44 am)
1. I don't know how to access the debugger.2. I'm trying to port 10 scripts.
3. Standard scripts.
#3
01/07/2012 (7:37 am)
1. Check the generated console log file
#5
01/07/2012 (11:49 am)
Oops, found it. ProjectFiles Directory.
#6
01/07/2012 (11:50 am)
1. I'm not getting any path errors
#7
How to you do a touch function? I think thats what is messing it up.
01/07/2012 (12:09 pm)
I just looked closer at my player.cs file and found that the only thing that was not working was the jump function(the only movement function). I found this out using echos.How to you do a touch function? I think thats what is messing it up.
#9
01/09/2012 (9:51 am)
Thanks, @MichaelPerry that helps. I am having a tough time with global touches. I edited game.cs and added a function to that, but its not running. Any idea why?
#10
01/09/2012 (9:53 am)
@CharlesL - If you are creating a new project, those functions should already be written and ready to use. The global multi-touch will only work on the simulator or iOS device, as they are unique to that platform.
#11
01/09/2012 (11:46 am)
OK, just tested it. I keep getting popups that say something about "t2dPhysics::castLine() Invalid Collision Detection". Only when I tap.
#12
01/09/2012 (11:49 am)
@MichaelPerry - Why can I tap in the demos?
#13
01/09/2012 (11:56 am)
@MichaelPerry - Why can I tap in the demos?
#14
01/10/2012 (5:11 am)
that depends on the demos, some have touch objects widely or use other forms, best look into their scripts how they work as they differ in how they work
#15
Note: I am not running my jump funtion when I tap.
01/11/2012 (2:20 pm)
Full error when I tap:Quote:Note: This is in XCode only! When I tap this error appears.
Fatal: (/Applications/iTorque2D_1_5/MyProjects/SpeedMonkey/buildFiles/Xcode_iPhone/../../../../engine/source/T2D/t2dPhysics.cc @ 3985) t2dPhysics::castLine() - Invalid Collision Detection Mode!
Note: I am not running my jump funtion when I tap.
#16
01/11/2012 (3:42 pm)
I just figured it out! I was using a tilemap and I set the tilemap collision mode to custom. That doesn't work. I changed it to full and now everything works!!!!!!!
Community Manager Michael Perry
ZombieShortbus
2. Also, how many scripts are you trying to port?
3. Are they behaviors or just standard scripts?