Is there a way to change the pitch of a sound in AGS through script?
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 Menu
function on_event (EventType event, int data)
{
if(event==eEventEnterRoomBeforeFadein)
{
if(version==0)
{
Room.SetProperty("versionnumber", 0);
}
}
}
int remtime;
// called on every game cycle, even when the game is blocked
function repeatedly_execute_always()
{
if(Room.GetProperty("versionnumber")==0)
{
if(object[0]!=null&&object[1]!=null)
{
object[0].Visible=true;
object[1].Visible=true;
}
if(object[2]!=null&&object[3]!=null)
{
object[2].Visible=false;
object[3].Visible=false;
}
}
if(Room.GetProperty("versionnumber")==1)
{
if(object[0]!=null&&object[1]!=null)
{
object[0].Visible=false;
object[1].Visible=false;
}
if(object[2]!=null&&object[3]!=null)
{
object[2].Visible=true;
object[3].Visible=true;
}
}
Object* o=Object.GetAtScreenXY(mouse.x, mouse.y);
if(o!=null&&mouse.IsButtonDown(eMouseLeft))
{
o.Graphic=15;
o.Graphic=16;
GiveScore(-1);
}
}
function game_start()
{
tileguide=Overlay.CreateGraphical(player.x, player.y,3);
}
function repeatedly_execute_always()
{
if(beforetilenum<100000)
{
beforetilenum+=1;
}
if(beforetilenum==100000)
{
beforetilenum=0;
}
if(tile[beforetilenum]==null)
{
tilenum=beforetilenum;
}
if(tileguide.Y<mouse.y&ileguide.X<mouse.x)
{
//bottom right
tileguide.X+=60;
tileguide.Y+=30;
}
if(tileguide.Y>mouse.y&ileguide.X>mouse.x)
{
//topleft
tileguide.X-=60;
tileguide.Y-=30;
}
if(tileguide.Y<mouse.y&ileguide.X>mouse.x)
{
//bottomleft
tileguide.X-=60;
tileguide.Y+=30;
}
if(tileguide.Y>mouse.y&ileguide.X<mouse.x)
{
//top right
tileguide.X+=60;
tileguide.Y-=30;
}
int dfg=3;
if(mouse.IsButtonDown(eMouseLeft))
{
tile[tilenum]=Overlay.CreateRoomGraphical(tileguide.X, tileguide.Y, dfg);
File* tilemap;
tilemap=File.Open("tilemap.txt", eFileAppend);
String s;
s=String.Format("tile[tilenum]=Overlay.CreateRoomGraphical(%d,%d,%d);",tileguide.X, tileguide.Y, dfg);
tilemap.WriteRawLine(s);
tilemap.Close();
}
if(IsKeyPressed(eKeyRightArrow))
{
Game.Camera.X+=13;
}
if(IsKeyPressed(eKeyLeftArrow))
{
Game.Camera.X-=13;
}
if(IsKeyPressed(eKeyUpArrow))
{
Game.Camera.Y-=13;
}
if(IsKeyPressed(eKeyDownArrow))
{
Game.Camera.Y+=13;
}
}
{
if(mouse.IsButtonDown(eMouseLeft))
{
if(mouse.Mode==eModemcar)
{
car=Overlay.CreateRoomGraphical(mouse.x, mouse.y, 2);
}
if(mouse.Mode==eModemblupi)
{
other[othernum]=Overlay.CreateRoomGraphical(mouse.x, mouse.y, 4);
File* newfile=File.Open("scene031",eFileWrite);
newfile.WriteString("TESTING TESTING TESTING");
newfile.Close();
}
}
}
function animateoverlay(Overlay* selectedoverlay, int Xposition, int Yposition, int startsprite,int endsprite, int transparent, int repeatoronce)
{
selectedoverlay=Overlay.CreateGraphical(Xposition, Yposition, startsprite,transparent);
selectedoverlay.Remove();
startsprite+=1;
if(startsprite!=endsprite)
{
CallRoomScript(animateoverlay(Overlay* selectedoverlay,int Xposition,int Yposition,int startsprite,int endsprite,int transparent,int repeatoronce));
}
else
{
if(repeatoronce==repeat)
{
startsprite=0;
}
if(repeatoronce==once)
{
selectedoverlay.Remove();
}
}
if(Hotspot.GetAtRoomXY(mouse.x, mouse.y)==hHotspot1)
{
if(fries2.Animating||fries.Animating)
{
mouse.Mode=eModeWalkto;
}
else
{
mouse.SaveCursorUntilItLeaves();
mouse.Mode=eModeclickable;
}
}
if (GetLocationType(mouse.x, mouse.y) == eLocationCharacter||GetLocationType(mouse.x, mouse.y) == eLocationObject && \\I thought maybe something here to set the condition of animating.)
{
if(__//any object that the mouse is over__.animating==true)
{
mouse.SaveCursorUntilItLeaves();
mouse.Mode=eModeclickable;
}
}
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.042 seconds with 14 queries.