Jump to content


aaaaa3000

Member Since 09 Jan 2006
Offline Last Active Mar 30 2013 07:22 PM

Posts I've Made

In Topic: Instance Nearest With A Certain Value

23 March 2013 - 09:49 PM

Make different objects for each building and make a single object to use as a parent for all the buildings. This is ideal in a RTS anyway since you won't want to code collisions for all buildings when you attack them, so you just code collisions for the parent object. You can then send the harvester to the nearest lumbermill or quarry or whatever.

 

Open Game Maker and press F1 and read up on parents.

oh cool, thanks that works, so useful


In Topic: embed youtube video in html 5?

19 December 2011 - 10:57 PM

You can easily add a video to the page.
As far as I've tested, rendering video into the game is also possible, however requires some JS.
Less sure for youtube videos specifically, since <video> tag takes actual video source (video file).

ok sick, I'm not familiar with javascript however, could you give me an example of how to do include video files? thanks

In Topic: how do I generate a 1-100 value out of input name

13 December 2011 - 05:16 AM

I have no idea what you want to save, but a general example would be something like this:

file = file_text_open_write("someFile.txt"); /* Open someFile.txt for writing */

file_text_write_string(file, "Hello, world!"); /* Write the string "Hello, world!" to the file */

file_text_writeln(file); /* Write a new line */

file_text_write_string(file, "Goodbye, cruel world!"); /* Write a string on the new line. */

file_text_close(file); /* Close the file. */

After doing that, you'll get a text file called someFile.txt with the contents:

Hello, world!
Goodbye, cruel world!

And as with anything, the things you write can be variables as well.

-IMP

Damn, it works if I export as an exe but not if I export for HTML5, this will take some fiddling with I suppose, or maybe I'll just post this as a new question

In Topic: how do I generate a 1-100 value out of input name

13 December 2011 - 04:32 AM

I'm not sure what differences or restrictions the HTML5 version of GM has, but in other versions you'd be using the ini_* commands, the file_text_* commands, or the file_bin_* commands. I don't know if GM:HTML5 has all of those or any; check the help file.

-IMP

yes it does have all of these, any examples of how to use these? its easier for me that way,

thanks

In Topic: how do I generate a 1-100 value out of input name

13 December 2011 - 04:23 AM

awesome, it works well, now how might I save my settings to create a library of custom words, Im working with the html 5 version of game maker?