skarik
|
|
Posted on: May 15, 2009, 10:55:51 pm |
|
|
Joined: Jul 2008
Posts: 46
|
Well, I was going to ask why draw_text doesn't work...and then I looked at the list of functions. Anyhow, why aren't there any games with Enigma? For me, all I really need is draw_sprite, and I've got meself a game. I mean, should I make a really random game? I noticed my little game's size is 632 kilobytes. Wicked! Anyhow, how is C++ used in Game Maker Enigma? At the current state (r3) could I make my own objects and classes? Also, is it possible to get the window handle in C++? I mean, how exactly is the C++ called? I can obviously see that cout isn't going to be working anytime soon. (That was a joke, by the way. I know where to use cout.) I'm off to play Fallout 3. Bye bye!
|
|
|
Logged
|
~~
|
|
|
|
skarik
|
|
Reply #2 Posted on: May 16, 2009, 09:08:03 pm |
|
|
Joined: Jul 2008
Posts: 46
|
technically, cout would actually work there, if you just #included it. Yah, but nothing would show. I mean, unless I, like, output to a different stream or something...but I don't understand how any of that stuff works, just how to use it. But hey! Cool! Time to try out some classes and shiz!
|
|
|
Logged
|
~~
|
|
|
skarik
|
|
Reply #3 Posted on: May 17, 2009, 02:29:39 pm |
|
|
Joined: Jul 2008
Posts: 46
|
Okay, how the hell do the string functions work?
I swear, every time I try to do something, it gives me this crap on how it can't covert from a char to a string...that's with string_char_at()...but I mean, how else am I going to do it? So I try cpp { i_char = main_string.at(i); } and then it throws that it's a var struct? What the hell?
So I remove the C++ and change the i_char to a "var" and that line gives me no problems. Then I come to: i_index = ord(i_char)-32; And it says that i_char is a std string again? Whut?!? So I do: cpp { i_index = i_char.at(0); } And it says that it's a var struct? Wa!? So then I just do i_index = i_char; and it works! WHAT THE HELL? I THOUGHT I DECLARED i_index AS A double !! Epic Automatic casting or sompin'?
And so it works, but what the hell?
Really, the whole script makes no sense to me. var main_font; main_font = argument3;
var main_string; main_string = argument2;
var main_string_i_max; main_string_i_max = string_length(main_string);
var i; var i_char; double i_index;
for (i = 0; i < main_string_i_max; i += 1) { i_char = string_char_at(main_string,i);
i_index = i_char;
i_index = i_index - 32; draw_sprite(sprMainFont,i_index,argument0+(i*13),argument1); } Oh, and I can only get the first index (image_index zero) of a sprite to draw. Is that known?
But anyhow, this is pretty sexy. XD
|
|
|
Logged
|
~~
|
|
|
skarik
|
|
Reply #4 Posted on: May 17, 2009, 02:52:14 pm |
|
|
Joined: Jul 2008
Posts: 46
|
Now I'm getting a bunch of weird stuff. It works one second and then dies the next. http://www.box.net/shared/rf354umc01It shows the code in the compiler box and then says something about an unexpected error or handle or event or something and it asks me if I would like to debug it with MSVC++ 2005.
|
|
|
Logged
|
~~
|
|
|
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #10 Posted on: June 09, 2009, 02:46:45 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
It's also for writing entire operating systems. And Dave's right; C will leave you with some nasty habits in C++.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|