My little project.

Started by , Tue 15/07/2003 15:59:11

Previous topic - Next topic

Minimi

keep this one, delete the other one, and test your game!

Plog

Arrgh I cant get my head round these nested funcions can someone sort this out for me.

function on_mouse_click(int button) {
// called when a mouse button is clicked. button is either LEFT or RIGHT
if (IsGamePaused() == 1) {
// Game is paused, so do nothing (ie. don't allow mouse click)
}
else if (button==LEFT) {
ProcessClick(mouse.x, mouse.y, GetCursorMode() );
if (GetCursorMode()==8) { ////////// this is the code for the inventory
InventoryScreen(); ////////// you don't have to include
} ////////// this message (good luck!)
}
else { // right-click, so cycle cursor
SetNextCursorMode();
}


function dialog_request(int parameter) {
if (parameter==1) {
SetDialogOption(4,2,1);
}
if (parameter==2) {
SetDialogOption(1,3,1);
}
if (parameter==3) {
SetDialogOption(4,3,1);
}
if (parameter==4) {
SetDialogOption(0,3,1);

jetxl

You forgot the } at the end.
put on the } behind SetNextCursorMode();

example: SetNextCursorMode();}

Plog

Now ive done this ive just realised I need to make it so if you left click while your cursor is a certain inventory item that it brings up a dialog.

Plog

Please I need your help so I can finish my game.

SMF spam blocked by CleanTalk