*updated* (new dev. journal post, made lots of progress on the song editor and engine
)

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: CaptainD on Fri 12/03/2010 15:49:30
Is there any way of using Tracker music and making a program to grab the notes information straight from the file?
Quote from: monkey_05_06 on Thu 11/03/2010 17:27:31Code: ags function repeatedly_execute_always() { if (!cEnemy.Moving) cEnemy.Walk(Random(Room.Width), Random(Room.Height)); }
.
.
.
Offset = 0;
String Line = SongList.ReadRawLineBack(); //get the entire line into the game memory
String LineChar = Line.Substring(Offset, 1); //This variable points to a single character in the line
if(LineChar == "I") //the line with the song information (song name/number) is started with an 'I'
{
SongFound = true;
Offset += 3;
LineChar = Line.Substring(Offset, 1);
while(LineChar != "}") //I'm assuming that the user wont mess around with the song file
{
StringNumber.Append(LineChar);
Offset++;
LineChar = Line.Substring(Offset, 1);
}
//I have to deal with the 'a' at the beginning of the string.
String TrimStringNumber = StringNumber.Substring(1, StringNumber.Length-1);
songnumber = TrimStringNumber.AsInt;
Offset += 3;
LineChar = Line.Substring(Offset, 1);
while(LineChar != ")")
{
SongSelect_SongName.Append(LineChar);
Offset++;
LineChar = Line.Substring(Offset, 1);
}
SongSelect_SongName = SongSelect_SongName.Substring(1, SongSelect_SongName.Length-1);
Offset += 3;
LineChar = Line.Substring(Offset, 1);
while(LineChar != ")")
{
SongSelect_Length.Append(LineChar);
Offset++;
LineChar = Line.Substring(Offset, 1);
}
SongSelect_Length = SongSelect_Length.Substring(1, SongSelect_Length.Length-1);
if($_ =~ /^I (\d) {(\w)} (\d)/)
{
$SongNumber = $1;
$SongName = $2;
$SongLength = $3;
}
QuoteHave you set BaselineOverridden to true?
Quote from: Gilbet V7000a on Thu 04/03/2010 10:39:10
About the animating "background" object, where do you put the code for animating it?
Quote from: SSH on Thu 04/03/2010 06:33:02
...change the baseline to a different value....
int DripObject;
function GetFreeObject()
{
Object* p_object;
int counter = 0;
while(counter <= 39)
{
p_object = object[counter];
if((p_object != null) && (p_object.Graphic == 0)) return counter;
else counter++;
}
return 0;
}
function PlayDripAnimation()
{
if(DripObject != null) return 0;
int DripObject = GetFreeObject();
object[FreeObject].SetView(x); //x is whatever view has the drip animation
object[FreeObject].Animate(x, y, eOnce, eNoBlock, eForwards);
return 0;
}
function room_RepExec()
{
if(Random(100) >= 99) PlayDripAnimation();
}
Quote from: Khris on Tue 16/02/2010 18:09:40
You have to stop the iteration at Room.ObjectCount - 1; object numbering starts at 0.
function GetVisibility()
{
int counter = 0;
int false_count = 0;
while(counter <= Room.ObjectCount)
{
if(!object[counter].Visible) false_count++;
}
if(false_count == Room.ObjectCount) return true;
else return false;
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.228 seconds with 14 queries.