Jump to content


XD005

Member Since 21 Apr 2006
Offline Last Active May 09 2013 11:16 AM

Topics I've Started

How to freeze the execution of events temporarily?

24 January 2012 - 09:24 AM

I want to freeze the queue of events so I can make a textbox object come up and then un-freeze once the object is destroyed. Kind of like the way GameGuy's Textbox system works. I want to be able to call the script in rapid succession and have textboxes be created one after the other. The textbox is animated so I currently have it set as a separate object. The textbox simply gets passed some arguments from the script for the body of the text and the script creates the object. I have tried deactivating all objects but the textbox but that doesn't work in succession and will even somehow get executed out-of-order.

Disappearing sprites

18 December 2011 - 10:00 AM

Hey, I have a script I've written that basically loops through all the frames in a second. This is made for a syncing engine of mine.
What happens is each second it loops through to see what data has been specified for this frame. The Y axis is all the different functions being sorted. Whilst the X axis is the actual frames. When there is data in a frame, the frames on the adjacent Y coordinates disappear. Any body have any idea whats wrong?

//Draw thirty frames for each fucntion...
for (i=1; i<31; i+=1)
{
    //Draw Channel Markers
    if not (i>30)
    {
     frame_status=string(ds_grid_get(timeline,second,i));
     for (f=0; f<display_size+1; f+=1)
     {
     //Draw a blank frame...
     if (frame_status="-")
     {draw_sprite(spr_frame,0,224+(32*i),224+(f*32))}
    
     //If the command returns 1, draw icon
     if (string_count(number_to_letter(display_start+f)+"1",frame_status)>0)
     {draw_sprite(spr_frame,1,224+(32*i),224+(f*32))}
     else
     {
     //If the command returns 0, draw icon
     if (string_count(number_to_letter(display_start+f)+"0",frame_status)>0)
     {draw_sprite(spr_frame,2,224+(32*i),224+(f*32));}
     }
     }
     //Draw timeline label
     draw_set_halign(fa_left);
}
}


How to calculate the length of a frame?

14 December 2011 - 10:42 PM

Hey, its been a while since I've done any coding sorry for this really easy question but...
frame_val=1000/30;

This will calculate how long one frame is in miliseconds, if the game is running at 30FPS correct?

RS232 (Serial Problem)

01 December 2011 - 09:42 AM

Hello. I am using the RS232 Extension. When I send the string "#0P2000" TO my SSC-32, it's supposed to make my relay switch on its picking up the command but the format isn't coming in correctly. I tried putting the \ before the number sign. Anything I'm missing?

Snapping on a Grid while moving in a direction

07 September 2011 - 09:47 PM

Hello. I am trying to snap a object to a 32x32 grid while moving it to the right at a certain speed. I put the snap in end step event. For some reason, it stops moving when it snaps. I've tried putting the snap in other places as well and it dosen't fix it. I've also tried using alarms but it won't let me use a variable as the time.