inventory sound problems

Started by Construed, Tue 19/11/2013 23:42:35

Previous topic - Next topic

Construed

Hey i use the:

Code: ags

General:
BASS Control is based on the fact that right click is used for walk/talk to/use
and left click to examine objects/hotspots/characters.
*/
static function BASSFunctions::mouse_click(MouseButton click, bool reverse){//handle true
Hotspot*htsp=Hotspot.GetAtScreenXY(mouse.x, mouse.y);
InventoryItem*invitem=InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
if (invitem!=null) {
if ((reverse==false) && (click==eMouseLeftInv)|| (reverse==true) && (click==eMouseRightInv)) {
invitem.RunInteraction(eModeLookat);
}
if ((reverse==false) && (click==eMouseRightInv)|| (reverse==true) && (click==eMouseLeftInv))  {
mouse.Mode=eModeUseinv;
player.ActiveInventory=invitem;
}
return;
}
if ((reverse==false) && (click==eMouseRight)|| (reverse==true) && (click==eMouseLeft))  {
if (player.ActiveInventory!=null) {
player.ActiveInventory=null;
return;
}
if (Character.GetAtScreenXY(mouse.x, mouse.y)!=null) {
ProcessClick(mouse.x,mouse.y,eModeTalkto);  
return;
}
if ((htsp!=null) && (htsp.ID>0) || (Object.GetAtScreenXY(mouse.x, mouse.y)!=null)){
ProcessClick(mouse.x,mouse.y,eModeInteract);  
return;
}
player.Walk(mouse.x+GetViewportX(), mouse.y+GetViewportY(), eNoBlock, eWalkableAreas);
}
if ((reverse==false) && (click==eMouseLeft)|| (reverse==true) && (click==eMouseRight))  {
if (player.ActiveInventory!=null) {
ProcessClick(mouse.x, mouse.y, eModeUseinv);  
return;
}
ProcessClick(mouse.x, mouse.y, eModeLookat);  
}
}


And I've tried adding aSound.play(); to every possible function of it and it wont seem to work, what i want to happen is when the player picks up or uses a scroll in his inventory it plays a paper rustling sound.
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

Construed

Perhaps some elaboration is due?

I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

SMF spam blocked by CleanTalk