Jump to content


darktree

Member Since 14 Sep 2010
Offline Last Active Mar 01 2013 09:44 AM

Topics I've Started

Crossfade Music

19 February 2013 - 06:18 PM

It seems you can only play one music file at the same time. How do I crossfade into another music track if that is the case? What am I doing wrong?

Having An Event Occur During Music

17 February 2013 - 05:22 PM

Is there a way to have objects created at specific moments during the playing of a music or sound file?

I'm trying to sync some effects to the beat of the music

for instance, I would like to create some particle effects at certain moments in the music, but I can't figure out how to make this happen at a specific time every interval of a 7 second loop.

I am trying to have a particle effect occur approximately 3.5 seconds into the loop, and then happen again each time the loop goes around.

In pseudocode:
if (snd_music.CurrentTime == room_speed * 3.5)
{
 	//do stuff
}

I realize I can get the length of the audio with audio_sound_length, but I do not know how to detect when the song is exactly 3.567 seconds into the song each time it loops around.

the problem is also, I need to pull from the song as it is playing, as relying on the speed of the room is unreliable, as even the slightest hiccup will pause the room for a second while the music is still playing and desync the room from the music playing.

Game Maker: Studio crashes after about 1 minute

07 November 2012 - 03:17 PM

Hello, I have Game Maker Studio Pro in Steam for Windows 7.

After having my project open for about 30 seconds and try to run it, game maker will crash/self close in the background while the game is running. The game itself never crashes and plays fine.
I even went back a few versions of my game and it still crashes now even with old projects. I've even tried opening other peoples projects that previously ran fine on my machine.
My game does not use sounds or anything that could be considered obnoxious.
I tested the integrity of the data cache with Steams checker thing, everything check out.
I have restarted the computer.
My version is 1.1.615.

Everything seems to work fine until I run a preview of my game, after which it runs the preview fine, but GM crashes in the background.

What is going on?

Embed fonts into executable

27 June 2012 - 02:08 PM

Hello,

How do I include fonts into my game so other players see the correct font?

I am making a game that uses a custom font for the Help dialog that pops up when users press F1. I have been primarily working on my laptop.

However, when I went to my main PC to test it out, I noticed the F1 dialog popped up with a generic Arial font, screwing up the spacing of everything in the help menu.

I read in some posts that Game Maker includes the font into the exe, or maybe it used to... but whatever the case... it is not for my game.

I looked in global settings and game preferences but found no option to include the font into my game / file / executable.

Objects detecting depth of other specific objects

30 March 2011 - 02:56 PM

Hello,

I am trying to have an object detect another objects variable to decide whether or not to attack it.
Also sorry,  I am editing this post, but the forums do not allow me to change the subject or description, although I want to change it as I no longer wish to detect an objects depth.

Example:

I am making a tower defense game in which a tower should detect the closest enemy object and attack it.
However, I do not want the tower to attack the enemy if he is under a bridge.
At the same time, there will be enemies on TOP of the bridge that SHOULD be attacked.

What I thought would be the most logical would be to have the enemy detect if it was going under the bridge.
If it did, set its depth lower and have it pass under and then when it exits, change its depth back to normal.
To do this, I have invisible depth controlling objects that the enemy touches on either side of the bridge which alter their depth.
But the objects have to be far enough away from the bridge that when they change depth, you don't see them "popping" under the bridge.
So after their depth is change so it looks nice when they pass under the bridge, I have the enemy object check for collision with the bridge.
If colliding, set a local variable called "underbridge" set to 1.

Right now the step code for my tower looks like this:

if instance_exists(obj_enemy)
{
 	if target = noone
      	target = instance_nearest(x,y,obj_enemy)
 	if point_distance(x,y,target.x,target.y) > range
      	target = noone;
 	else if firing = 0
      	firing = 1;
}

What I would like to do is check the obj_enemy.underbridge and only set firing=1 if obj_enemy.underbridge=0.
The problem is if the tower detects ONE enemy object as having that condition, it doesn't attack at all until no enemy is under the bridge.
Each enemy is spawned from a spawner so they are all the same object, with unique id's.

See attached picture to see what I mean:
The pink bars are the objects that when passed through, change an objects depth and back so that they can pass over/under the bridge.
Posted Image