turnSpeed

Learn to use DS Game Maker by Example.

Re: turnSpeed

Postby Nobody » January 30th, 2014, 5:01 am

all you have to do is use the button held and button release events. If the button is released, set the variable holding the button downtime to zero. When the button is held, increment the hold variable.
Feel free to ask me for help. I'm on the forum a lot.

Recent Projects:
Retro Ducks: viewtopic.php?f=13&t=3533 (latest)
The Living Dead 2: viewtopic.php?f=13&t=3483
Crafters DS (Minecraft 2D Clone!) viewtopic.php?f=13&t=3082
User avatar
Nobody
 
Posts: 2323
Joined: February 14th, 2011, 12:08 am
Location: United States of America

Re: turnSpeed

Postby Buck_7 » January 30th, 2014, 6:28 pm

So how`s your game going sckuz254É Did you get it to work yet :|
User avatar
Buck_7
 
Posts: 1460
Joined: February 19th, 2011, 1:44 am

Re: turnSpeed

Postby nicklausw » January 30th, 2014, 6:37 pm

Buck_7 wrote:So how`s your game going sckuz254É Did you get it to work yet :|

He's got a nice system going on. All I've been doing is playing around with your fade in/out actions. ;)
my stuff
pong - sms/gb
sudoku - sega master system

next project - something for the nes, perhaps?[/b]
User avatar
nicklausw
 
Posts: 1037
Joined: May 23rd, 2011, 10:25 pm
Location: The Capital Wasteland

Re: turnSpeed

Postby Brian.Washechek » January 30th, 2014, 11:45 pm

"Tomorrow" came and no answer to my problem.

Oh well..

Okay... Well, how do I do "is not being pressed"... In C++ you could do "-", but i don't know how game maker wants it.
User avatar
Brian.Washechek
 
Posts: 284
Joined: April 22nd, 2012, 1:06 am
Location: Casper, Wyoming

Re: turnSpeed

Postby Buck_7 » January 31st, 2014, 12:43 am

Huh, I didn't know the was a significant difference between the two languages - you should study C or whatever language DSGM uses online.

You already have the answer to your question sckuz254. If you don't read people's advice or learn off of the examples people give you, you'll never get anywhere.

Here are some code you can use:
Code: Select all
if(Pad.Held.Up)

if(!Pad.Held.Up) //The ! before the Pad is "Is Not" so if Pad is not held up.

or you can do:

more examples:

Code: Select all
int x;
if(x!=0) // If x is not equal to zero


Code: Select all
if(Pad.Held.Up){
    //Your code here when pad is held up
    }else{
    //Code for if pad is not held up
}
User avatar
Buck_7
 
Posts: 1460
Joined: February 19th, 2011, 1:44 am

Re: turnSpeed

Postby Nobody » January 31st, 2014, 6:54 am

sckuz254 wrote:"Tomorrow" came and no answer to my problem.

Oh well..

Okay... Well, how do I do "is not being pressed"... In C++ you could do "-", but i don't know how game maker wants it.

a couple of people offered suggestions. Don't post lies like this. It's highly offense that we took our time to help you out but you not only ignored or help, but stated that we never offered help.

Buck_7 wrote:You already have the answer to your question sckuz254. If you don't read people's advice or learn off of the examples people give you, you'll never get anywhere.

Buck is right. Often people on this forum offer help but you never seem to really listen to what we post. Don't ask for help if you're not going to use the resources we give you; it defeats the purpose of you asking for help and us spending time to try and help you
Feel free to ask me for help. I'm on the forum a lot.

Recent Projects:
Retro Ducks: viewtopic.php?f=13&t=3533 (latest)
The Living Dead 2: viewtopic.php?f=13&t=3483
Crafters DS (Minecraft 2D Clone!) viewtopic.php?f=13&t=3082
User avatar
Nobody
 
Posts: 2323
Joined: February 14th, 2011, 12:08 am
Location: United States of America

Re: turnSpeed

Postby Brian.Washechek » February 1st, 2014, 6:13 am

I apologize, and thank you for your help.

The "'Tomorrow' came and no answer to my problem. " was my sad attempt at a joke...
Last edited by Brian.Washechek on February 2nd, 2014, 3:48 am, edited 2 times in total.
User avatar
Brian.Washechek
 
Posts: 284
Joined: April 22nd, 2012, 1:06 am
Location: Casper, Wyoming

Re: turnSpeed

Postby Brian.Washechek » February 2nd, 2014, 12:06 am

Okay... I've arrived at what for now I'm CURRENTLY seeing as an acceptable solution.

EXCEPT the one problem that still baffles me:
The ship doesn't go exactly in the direction it's aimed. For example: occasionally you can be aimed "kind of" up... but just "kind of"... and it still goes straight up...

I've spent a good deal of time time searching for the cause of this error, and I could not find it. So here I am, requesting assistance.

I'm almost sure it have to of with the lack of precession in my "Spin" variable. When I try to resolve this error by turning the variable "Spin" into a float, it responded with the error: "c:/DSGMTempDisruptedForce1-31-201439431151/include/GameWorks.h:69:48: error: invalid operands to binary & (have 'float' and 'int')"

I'm unsure how I can respond to this error. The only solution (turning the variable "Spin" into a float). It didn't work because it say I'm not allowed! They're MY variables! I should be allowed!

I'm just about positive my problem comes from the fact that the variable "Spin" is stuck being an integer, but i have no idea how to change that...

Hopefully, someone does......
Attachments
Disrupted Force 1-31-2014.dsgm
-?
(61.98 KiB) Downloaded 232 times
User avatar
Brian.Washechek
 
Posts: 284
Joined: April 22nd, 2012, 1:06 am
Location: Casper, Wyoming

Re: turnSpeed

Postby BLsquared » February 2nd, 2014, 5:41 pm

Um, you are'nt allowed to count Radians in floats, just integers. Or something like that, when I was trying to have Radian-based movement, it wouldn't go perfectly straight either. What are you using for aiming? The stylus's x and y? If so, change it to "stylus.X-RoomData.BottomX" and "stylus.Y-RoomData.BottomY". This checks for the stylus's position relative to the view of the bottom screen. If the "-" doesn't work, try "+".
You may call me BLsquared, Commodore, or TexasBatman. Preferably BLsquared.
My avatar was made by this guy: http://christianmanga.com/smf/index.php ... bum;in=374

"Every puzzle has an answer." - Professor Layton
"In war, there is indeed no substitute for victory." - Douglas MacArthur
"Love and Peace!" - Vash the Stampede
"It's High Noon!" - McCree
Member of Memefefe's Squad
User avatar
BLsquared
 
Posts: 997
Joined: August 10th, 2011, 4:39 pm
Location: United States of America

Re: turnSpeed

Postby Brian.Washechek » February 2nd, 2014, 9:15 pm

Sorry, but It has nothing to do with the stylus at all. Yet, anyway..
???
I'm just looking for a way to make the ship fly in the direction it' aimed.
User avatar
Brian.Washechek
 
Posts: 284
Joined: April 22nd, 2012, 1:06 am
Location: Casper, Wyoming

Re: turnSpeed

Postby Buck_7 » February 2nd, 2014, 9:34 pm

Commodore wrote:Um, you are'nt allowed to count Radians in floats, just integers. Or something like that, when I was trying to have Radian-based movement, it wouldn't go perfectly straight either. What are you using for aiming? The stylus's x and y? If so, change it to "stylus.X-RoomData.BottomX" and "stylus.Y-RoomData.BottomY". This checks for the stylus's position relative to the view of the bottom screen. If the "-" doesn't work, try "+".


Simple 8-)
User avatar
Buck_7
 
Posts: 1460
Joined: February 19th, 2011, 1:44 am

Re: turnSpeed

Postby nicklausw » February 2nd, 2014, 10:29 pm

I recall telling sckuz before that he should keep these things as integers.
my stuff
pong - sms/gb
sudoku - sega master system

next project - something for the nes, perhaps?[/b]
User avatar
nicklausw
 
Posts: 1037
Joined: May 23rd, 2011, 10:25 pm
Location: The Capital Wasteland

Re: turnSpeed

Postby Brian.Washechek » February 2nd, 2014, 11:30 pm

Keep what things as integers? As far as I know, every numerical variable in my game is an integer.

Perhaps there are additional variables I am unaware of... How do i see them?
User avatar
Brian.Washechek
 
Posts: 284
Joined: April 22nd, 2012, 1:06 am
Location: Casper, Wyoming

Re: turnSpeed

Postby nicklausw » February 3rd, 2014, 12:34 am

sckuz254 wrote:Keep what things as integers? As far as I know, every numerical variable in my game is an integer.

Perhaps there are additional variables I am unaware of... How do i see them?

DSGM file, please.
my stuff
pong - sms/gb
sudoku - sega master system

next project - something for the nes, perhaps?[/b]
User avatar
nicklausw
 
Posts: 1037
Joined: May 23rd, 2011, 10:25 pm
Location: The Capital Wasteland

Re: turnSpeed

Postby Brian.Washechek » February 3rd, 2014, 1:02 am

Thank you if you're willing to help me!
Attachments
Disrupted Force 1-31-2014.dsgm
(61.98 KiB) Downloaded 224 times
Last edited by Brian.Washechek on February 3rd, 2014, 1:13 am, edited 2 times in total.
User avatar
Brian.Washechek
 
Posts: 284
Joined: April 22nd, 2012, 1:06 am
Location: Casper, Wyoming

Re: turnSpeed

Postby nicklausw » February 3rd, 2014, 1:12 am

At first glance, you lied to me; there are floats.
my stuff
pong - sms/gb
sudoku - sega master system

next project - something for the nes, perhaps?[/b]
User avatar
nicklausw
 
Posts: 1037
Joined: May 23rd, 2011, 10:25 pm
Location: The Capital Wasteland

Re: turnSpeed

Postby Brian.Washechek » February 3rd, 2014, 1:25 am

Yes, you're correct.
I'm sorry, I don't know what happened.

Okay....
.....

Well, they're all integers in this build and it still goes straight up while the ship is slightly crooked.
Attachments
Disrupted Force 2-2-2014.dsgm
(61.98 KiB) Downloaded 228 times
User avatar
Brian.Washechek
 
Posts: 284
Joined: April 22nd, 2012, 1:06 am
Location: Casper, Wyoming

Re: turnSpeed

Postby nicklausw » February 3rd, 2014, 1:38 am

Please explain your whole system to me. I don't understand how you're using sine, cosine and other stuff.
my stuff
pong - sms/gb
sudoku - sega master system

next project - something for the nes, perhaps?[/b]
User avatar
nicklausw
 
Posts: 1037
Joined: May 23rd, 2011, 10:25 pm
Location: The Capital Wasteland

Re: turnSpeed

Postby Brian.Washechek » February 3rd, 2014, 2:37 am

[X] + PA_Cos(Spin)*.01 and [Y] - PA_Sin(Spin)*.01 with ".01" representing the ships speed should work to place the ship in the correct place, right?

I'm using the variable "Spin" to complete the function that it's name implies. It represents the direction the ship is facing. The entire thing is based on very old method, although, my guess is that i'm over-thinking it.

In the games prequel, "Force Disruptor" , that's how I did it. My problem is i only have the executable file! The code is gone due to my extremely good friendship with a moron named "Bill Eckerson" who moved from Casper (good job, Casper sucks!) and is on a run from his past, so, on a run from me (not such a good job, because in my opinion, I don't suck!). He blames the fact that my code is absent on my mom because he can't admit fault and take any blame for his actions! Just don't get me started on that! I've doubtlessly already said more than you prefer to hear.

I have the executable to the game. It would be a God-send if you could decompile it, but that ship of hope sank a long, long, long, very long time ago! It lies at the bottom of the "Brian's past" ocean, sitting next to the ship that represents my friendship with Bill...........

...........That was extremely deep. I'm sorry if I just blew your mind...

I envy you if you can get them running with just the executables. I've only seen them run on a single computer, but the fact that they're basically uneditable just depresses me...

There is probably is an easier way in DS Game Maker to do this... Please tell me if there is...
Attachments
Force Disruptor.rar
(4.04 MiB) Downloaded 223 times
User avatar
Brian.Washechek
 
Posts: 284
Joined: April 22nd, 2012, 1:06 am
Location: Casper, Wyoming

Re: turnSpeed

Postby Brian.Washechek » February 6th, 2014, 4:00 am

Okay. I tried rotating the ship then following your directions, but then ran into an error that I don't even come close to understanding. Do think you could help?
Attachments
Disrupted Force 2-5-2014.dsgm
(62.01 KiB) Downloaded 228 times
User avatar
Brian.Washechek
 
Posts: 284
Joined: April 22nd, 2012, 1:06 am
Location: Casper, Wyoming

PreviousNext

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron