Mouse Draggable
by Rachel P · in iTorque 2D · 04/30/2012 (10:10 pm) · 4 replies
Hi guys,
I'm trying to use the Mouse Draggable behavior found here (http://tdn.garagegames.com/wiki/TGB/Behaviors/Mouse_Draggable) with iT2D 1.4.1 and am having problems. I tried searching the site and saw that apparently the behavior no longer works with version 1.4.1. What's weird, however, is that in one of my projects it works just fine. However, in this other one, it doesn't. I heard there was a workaround, but I can't seem to find exactly what that is. I hate to be a bother, but can anyone point me in the right direction in how I can drag things (in the same manor as the Mouse Draggable behavior) in iT2D 1.4.1?
Thanks in advance for your help. :)
Rachel
EDIT: I actually think it is a problem with all behaviors in general. For this project, I'm using the iT2D Kart Kit and I can't seem to get any behaviors to function.
I'm trying to use the Mouse Draggable behavior found here (http://tdn.garagegames.com/wiki/TGB/Behaviors/Mouse_Draggable) with iT2D 1.4.1 and am having problems. I tried searching the site and saw that apparently the behavior no longer works with version 1.4.1. What's weird, however, is that in one of my projects it works just fine. However, in this other one, it doesn't. I heard there was a workaround, but I can't seem to find exactly what that is. I hate to be a bother, but can anyone point me in the right direction in how I can drag things (in the same manor as the Mouse Draggable behavior) in iT2D 1.4.1?
Thanks in advance for your help. :)
Rachel
EDIT: I actually think it is a problem with all behaviors in general. For this project, I'm using the iT2D Kart Kit and I can't seem to get any behaviors to function.
#2
I'm testing on my Mac. And no, there don't seem to be any errors of that kind. Like I said, I'm using the Kart Kit and I've noticed that to refer to an object in scripts for it, you have to put %this.mode7 as opposed to just %this. As I look through the behavior code, there's instances of %this and %this.owner. Do you think this has anything to do with the problem? I tried adding .mode7 to parts but I can't get it working.
Also, one more question if you don't mind. I'm actually trying to test it on my iPhone, however I can't get the project to build correctly in Xcode. It gives me the "iPhoneCmdLine.txt is missing" error. I've searched my computer and it doesn't look like I have this file anywhere. I'm guessing that's needed for a successful build? Is there a copy of the .txt file I could get somewhere?
Thanks a lot for your help!
05/01/2012 (9:51 am)
Thanks for the response,I'm testing on my Mac. And no, there don't seem to be any errors of that kind. Like I said, I'm using the Kart Kit and I've noticed that to refer to an object in scripts for it, you have to put %this.mode7 as opposed to just %this. As I look through the behavior code, there's instances of %this and %this.owner. Do you think this has anything to do with the problem? I tried adding .mode7 to parts but I can't get it working.
Also, one more question if you don't mind. I'm actually trying to test it on my iPhone, however I can't get the project to build correctly in Xcode. It gives me the "iPhoneCmdLine.txt is missing" error. I've searched my computer and it doesn't look like I have this file anywhere. I'm guessing that's needed for a successful build? Is there a copy of the .txt file I could get somewhere?
Thanks a lot for your help!
#3
05/01/2012 (10:05 am)
When inside a behavior method, %this refers to the behavior instance itself. %this.owner refers to the object instance to which the behavior is attached.
#4
I see the majority of issues lie in audiobuffer.cc, audio.cc, and audioDatablock.cc. Since I've never compiled a game in Xcode before, I am unfortunately at a complete loss at what exactly to do to fix it.
(by the way, I e-mailed the creator of the Kart Kit about the Mouse Draggable problem to see if he can help. right now, getting the game to compile and run on the iPhone is my biggest concern)
05/01/2012 (3:58 pm)
Alright, so I found out all iPhoneCMDLine.txt had was "-missing -this" so I created the file and that's not longer a problem. However, I'm now getting about 21 other build errors (and 18 warnings). Here's the errors:/Applications/iTorque2D_1_4_1/engine/source/audio/audioBuffer.cc
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:13:26: error: vorbis/codec.h: No such file or directory
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:187: error: 'readOgg' was not declared in this scope
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:339: error: no 'bool AudioBuffer::readOgg(ResourceObject*)' member function declared in class 'AudioBuffer'
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:341: error: 'OggVorbisFile' was not declared in this scope
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:341: error: expected `;' before 'vf'
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:342: error: 'vorbis_info' was not declared in this scope
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:342: error: 'vi' was not declared in this scope
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:363: error: 'vf' was not declared in this scope
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:368: error: 'vf' was not declared in this scope
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:386: error: 'oggRead' was not declared in this scope
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:405: error: 'long int AudioBuffer::oggRead' is not a static member of 'class AudioBuffer'
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:405: error: 'OggVorbisFile' was not declared in this scope
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:405: error: 'vf' was not declared in this scope
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:405: error: expected primary-expression before 'char'
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:405: error: expected primary-expression before 'int'
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:406: error: expected primary-expression before 'int'
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:406: error: expected primary-expression before 'int'
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:406: error: initializer expression list treated as compound expression
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audioBuffer.cc:407: error: expected ',' or ';' before '{' token
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audio.cc:2480: error: invalid conversion from 'ALubyte*' to 'const ALCchar*'
/Applications/iTorque2D_1_4_1/engine/compilers/Xcode_iPhone/../../source/audio/audio.cc:2480: error: initializing argument 1 of 'ALCdevice* alcOpenDevice(const ALCchar*)'I see the majority of issues lie in audiobuffer.cc, audio.cc, and audioDatablock.cc. Since I've never compiled a game in Xcode before, I am unfortunately at a complete loss at what exactly to do to fix it.
(by the way, I e-mailed the creator of the Kart Kit about the Mouse Draggable problem to see if he can help. right now, getting the game to compile and run on the iPhone is my biggest concern)
Community Manager Michael Perry
ZombieShortbus