Jump to content


bigttcool2

Member Since 07 Nov 2009
Offline Last Active Aug 06 2012 08:34 PM

Posts I've Made

In Topic: Parsing Commands

06 August 2012 - 07:48 PM

You're probably right. I've been using GM7 Pro for at least 5 years, so this is probably a stupid mistake.

I wrote my own substr function to trim off all the possible commands (the title of the script means nothing - it started as a substr...)

I also wrapped my own string_count (_string_count) for ease of code translation because I origionally wrote this in java. It also makes it safe to feed it more than two arguments. It swaps the two arguments, so _string_count(arg0,arg1) becomes string_count(arg1,arg0).

   :GM040: In my alarm[0] event (where it checks for confirmed input)

alarm[0] = 30;
command = <command code here>

if (_string_count(command,"<")) {
      //error occured

exit;
}
if (_string_count(command,">link ")) {
arg = string_substr(arg);
//do function
}
if (_string_count(command,">dial ")) {
arg = string_substr(arg);
//do function
}
if (_string_count(command,">call ")) {
arg = string_substr(arg);
//do function 
}
if (_string_count(command,">notify ")) {
 arg = string_substr(arg);
 //do function
}
if (_string_count(command,">text ")) {
 arg = string_substr(arg);
// dosomething
}

And my current implementation of string_substr (again, not actually a substr function, but I just called it that)




str = argument0;
str = string_replace(str,">link",""); //delete the commands
str = string_replace(str,">call","");
str = string_replace(str,">dial","");
str = string_replace(str,">text","");
str = string_replace(str,">del","");
str = string_replace(str,">dl","");
str = string_replace(str,">rnm","");
str = string_delete(str,1,1); //remove the space between the command and the args
return str;

In Topic: In-game menus and messages

06 August 2012 - 06:17 PM

message_background(back) Sets the background image for the pop-up box for any of the functions above. back must be one of the backgrounds defined in the game. If back is partially transparent so is the message image (only for Windows 2000 or later).
message_alpha(alpha) Sets the alpha translucence for the pop-up box for any of the functions above. alpha must lie between 0 (completely translucent) and 1 (not translucent) (only for Windows 2000 or later).
message_button(spr) Sets the sprite used for the buttons in the pop-up box. spr must be a sprite consisting of three images, the first indicates the button when it is not pressed and the mouse is far away, the second indicates the button when the mouse is above it but not pressed and the third is the button when it is pressed.
message_text_font(name,size,color,style) Sets the font for the text in the pop-up box. (This is a normal Windows font, not one of the font resources you can out in your game!) style indicates the font style (0=normal, 1=bold, 2=italic, and 3=bold-italic).
message_button_font(name,size,color,style) Sets the font for the buttons in the pop-up box. style indicates the font style (0=normal, 1=bold, 2=italic, and 3=bold-italic).
message_input_font(name,size,color,style) Sets the font for the input field in the pop-up box. style indicates the font style (0=normal, 1=bold, 2=italic, and 3=bold-italic).
message_mouse_color(col) Sets the color of the font for the buttons in the pop-up box when the mouse is above it.
message_input_color(col) Sets the color for the background of the input filed in the pop-up box.
message_caption(show,str) Sets the caption for the pop-up box. show indicates whether a border must b e shown (1) or not (0) and str indicates the caption when the border is shown.
message_position(x,y) Sets the position of the pop-up box on the screen. Use -1, -1 to center the box.
message_size(w,h) Fixes the size of the pop-up box on the screen. If you choose -1 for the width the width of the image is used. If you choose -1 for the height the height is calculated based on the number of lines in the message.


Thats from the GM7 help. Those will customize the box to what you want. I have no idea if they require pro or not...


In Topic: Unable to run Android apps

06 March 2012 - 03:08 AM

I have, and no dice. For all three platforms too.

In Topic: Unable to run Android apps

06 March 2012 - 02:54 AM

Perhaps I should have included that I do have the Android SDK and the JDK installed and up to date. I have all of the pieces in place. I mention the JRE7 because I have no idea how tools such as adb, aadt, and the like run (if they run normally, through java, or what) and maybe that would have been affected it in some way. If I'm not mistaken, JRE7 isn't stable yet and I'm using it as a pre-release thing. I am able to make Java programs and Android apps through something like eclipse, so I know the Android SDK and the JDK are all ready to go. Perhaps I should mention that I have a 32-bit Windows 7 computer, more than capable of running all of this, and a myTouch 4G running Android 2.2.1 (isn't the requirement 2.1? I do have a tablet running 2.3.6 if that's the case.)

In Topic: Unable to run Android apps

06 March 2012 - 12:13 AM

Nothing works, it did the same thing. Does it matter that I have JRE7? I don't thing the runtime environment does much, and even if it did it would have ample backwards compatability. Thanks for the quick response by the way!

~bigttcool2