Jump to content


GM 8.1 "tiny" feature request...


  • This topic is locked This topic is locked
186 replies to this topic

#161 garrlker

garrlker

    GMC Member

  • GMC Member
  • 343 posts

Posted 19 March 2011 - 11:20 PM

EDIT:Sorry, my internet is buggy today and sent two posts.

Edited by garrlker, 19 March 2011 - 11:23 PM.

  • 0

#162 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • Retired Staff
  • 9260 posts
  • Version:Unknown

Posted 19 March 2011 - 11:29 PM

I don't know if these will take long so let's see.
A function that will take a color and return the opposite. I've needed one before, but still can't figure out the way to do it in GML but I know it can be.
And set certain objects and rescources to a ctrl+ whatever key. For instance I set obj_player to ctrl+p, save my game and close. Next day I log back on and hit ctrl+p and my object pops back up without having to dig through folders. It's not really a needed function but could help some people. I certainly wouldn't mind.

By "opposite", you mean the inverse?

/* color_get_inverse(col) */
var r,g,b;
r=color_get_red(argument0);
g=color_get_green(argument0);
b=color_get_blue(argument0);
return make_color_rgb(255-r, 255-g, 255-b);

-IMP ;) :)
  • 0

#163 blopit

blopit

    KING OF EVERYTHING

  • GMC Member
  • 784 posts
  • Version:GM8.1

Posted 19 March 2011 - 11:31 PM

Dear Santa,
I have 2 suggestions cause I'm a rebel. I want screen_redraw_part(x,y,w,h) and support for .apng
-Blopit

Edited by blopit, 19 March 2011 - 11:32 PM.

  • 2

#164 Smarty

Smarty

    GMC Member

  • Retired Staff
  • 7228 posts
  • Version:GM:Studio

Posted 19 March 2011 - 11:53 PM

I don't know if these will take long so let's see.
A function that will take a color and return the opposite. I've needed one before, but still can't figure out the way to do it in GML but I know it can be.

If you mean the inverted color, it should be pretty simple:

inverted_color=$FFFFFF-color

  • 0

#165 Docopoper

Docopoper

    You are observant!

  • GMC Member
  • 1287 posts
  • Version:GM:Studio

Posted 19 March 2011 - 11:58 PM

Ok, I read about the first 3 pages and gave up, so I hope these are new:

1) A function to check if a string could be converted to a real without error - The real() function nearly does this anyway.

2) Setting the working directory of files when executing.

3) Simple window focus/foreground functions.

EDIT: There are going to be way to many suggestions by morning for mike to look at them - I hope he is still up!

EDIT 2: Oh, sorry - I forgot the 1 per customer rule... Well, seems kind of stupid to remove them... Just ignore the 2 harder ones. :-)

Edited by Docopoper, 20 March 2011 - 12:10 AM.

  • 0

#166 Big J

Big J

    GMC Member

  • GMC Member
  • 2818 posts
  • Version:GM8.1

Posted 20 March 2011 - 12:15 AM


I don't know if these will take long so let's see.
A function that will take a color and return the opposite. I've needed one before, but still can't figure out the way to do it in GML but I know it can be.

If you mean the inverted color, it should be pretty simple:

inverted_color=$FFFFFF-color

This works too, don't know if it's faster, slower, or the same.
inverted_color = color ^ c_white;

Edited by Big J, 20 March 2011 - 12:16 AM.

  • 0

#167 icicle.flame

icicle.flame

    CyntaxGames

  • New Member
  • 283 posts

Posted 20 March 2011 - 12:16 AM

A file function?
Directory_get_files(ARRAY,DIRECTORY);

Recursively adds files to an array from directory.
  • 0

#168 thatshelby

thatshelby

    GMC Member

  • GMC Member
  • 3823 posts
  • Version:GM8

Posted 20 March 2011 - 12:24 AM

Ok, I read about the first 3 pages and gave up, so I hope these are new:

1) A function to check if a string could be converted to a real without error - The real() function nearly does this anyway.

2) Setting the working directory of files when executing.

3) Simple window focus/foreground functions.

EDIT: There are going to be way to many suggestions by morning for mike to look at them - I hope he is still up!

EDIT 2: Oh, sorry - I forgot the 1 per customer rule... Well, seems kind of stupid to remove them... Just ignore the 2 harder ones. :-)


1) isreal()/isstring() should suit your purposes.

2) That would defeat the purpose of working_directory; that's where the program is. >_<

3) window_set_* functions should be good.
  • 0

#169 paul23

paul23

    GMC Member

  • Global Moderators
  • 3368 posts
  • Version:GM8

Posted 20 March 2011 - 12:32 AM

2) That would defeat the purpose of working_directory; that's where the program is. >_<

Nope, if you "open with" on a file, the working directory is that file. And there are other cases where the working directory changes (shortcuts?).

Though I think the underlying request is that dll/ini files don't have to be in the working directory's folder.

Edited by paul23, 20 March 2011 - 12:33 AM.

  • 0

#170 Docopoper

Docopoper

    You are observant!

  • GMC Member
  • 1287 posts
  • Version:GM:Studio

Posted 20 March 2011 - 12:35 AM


Ok, I read about the first 3 pages and gave up, so I hope these are new:

1) A function to check if a string could be converted to a real without error - The real() function nearly does this anyway.

2) Setting the working directory of files when executing.

3) Simple window focus/foreground functions.

EDIT: There are going to be way to many suggestions by morning for mike to look at them - I hope he is still up!

EDIT 2: Oh, sorry - I forgot the 1 per customer rule... Well, seems kind of stupid to remove them... Just ignore the 2 harder ones. :-)


1) isreal()/isstring() should suit your purposes.

2) That would defeat the purpose of working_directory; that's where the program is. >_<

3) window_set_* functions should be good.


1) isreal()/isstring() are different - they check if a variable is a real/string - I am talking about checking if a string would make the real() function throw an error if you put it in:
ex: real("hello") would show an error - so this function should tell you that it will.

2) The working directory is where the game is stored - the problem is that if you make GM execute a program that is in a different directory then it's working_directory is set to GM's directory.
I had this problem when trying to execute a batch file that executes more batch files in it's own folder - the batch file couldn't find the others because it thought it was in GM's folder not it's own.

Edited by Docopoper, 20 March 2011 - 12:36 AM.

  • 0

#171 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 20 March 2011 - 12:45 AM

:OOOOOOO

Forgot about something, this in GML.
  • 2

#172 blopit

blopit

    KING OF EVERYTHING

  • GMC Member
  • 784 posts
  • Version:GM8.1

Posted 20 March 2011 - 12:51 AM

:OOOOOOO

Forgot about something, this in GML.


wait isn't that like variable_local_exists(name)??
  • 0

#173 Rusky

Rusky

    GMC Member

  • New Member
  • 2450 posts

Posted 20 March 2011 - 01:55 AM

variable_local_exists(name) || variable_global_exists(name) is closer, disregarding scope differences between the languages.
  • 0

#174 GameGeisha

GameGeisha

    GameGeisha

  • GMC Member
  • 2749 posts
  • Version:GM:Studio

Posted 20 March 2011 - 02:23 AM

Instead of defaulting the resource names to something like sprite0 and object583, I'd prefer that the names be set to something like spr_0 and obj_583 by default, and when the properties window appears, the number part is highlighted so that we can immediately type in the proper name. Also, when handling pictures/sounds being dragged into the designer window, make it so that the name defaults to something like spr_<name of file> rather than sprite0_<name of file> (of course, if there are invalid characters like ! and spaces, replace them with underscores). It's a minor change that I think would be pretty convenient, and would encourage novices to start prefixing because they aren't made to change the entire name of the resource.

GameGeisha

Edit: One more extension to this idea --- if the extension of the file dragged into the window is not recognized as a picture, a sound or a GM-related filetype, add it as an include file. Bring up the include file menu to let the user know it has been added.

Edited by GameGeisha, 20 March 2011 - 02:43 AM.

  • 6

#175 Water Chicken

Water Chicken

    Got it memorized?

  • GMC Member
  • 1191 posts
  • Version:GM:Studio

Posted 20 March 2011 - 02:28 AM

Or allow the user to change the default prefix in the preferences?
  • 2

#176 Schyler

Schyler

    Noskcirderf Derf

  • GMC Member
  • 2445 posts
  • Version:GM8.1

Posted 20 March 2011 - 03:34 AM

#define taking too long to add? Joke?

Would you like me to add it for you?
  • 0

#177 Camman

Camman

    UnReal Software CEO

  • GMC Member
  • 634 posts
  • Version:GM:Studio

Posted 20 March 2011 - 04:21 AM

Copy and paste D&D actions from one GM window to another?

That is all :)
  • 1

#178 thatshelby

thatshelby

    GMC Member

  • GMC Member
  • 3823 posts
  • Version:GM8

Posted 20 March 2011 - 04:31 AM

:OOOOOOO

Forgot about something, this in GML.



I don't think you can have a null in GM, so that seems a little pointless, unless you're using 'var fudiafudisa;', in which case you're setting it in the script/code.
  • 0

#179 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 20 March 2011 - 04:36 AM


:OOOOOOO

Forgot about something, this in GML.



I don't think you can have a null in GM, so that seems a little pointless, unless you're using 'var fudiafudisa;', in which case you're setting it in the script/code.

Null as in not set. Never been assigned to, ignored script parameters, etc. It already partially exists since some values can return false for both is_real() and is_string().
  • 2

#180 garrlker

garrlker

    GMC Member

  • GMC Member
  • 343 posts

Posted 20 March 2011 - 04:41 AM

Thank you for that little bit of code. And yes I meant inverse.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users