Click In Inventory Item.

Started by , Sun 20/07/2003 01:41:50

Previous topic - Next topic

Plog

function on_mouse_click(int button) {
if (IsGamePaused() == 1) {
}
else if (button==LEFT) {
ProcessClick(mouse.x, mouse.y, GetCursorMode() );
if (GetCursorMode()==8) {
InventoryScreen();
}
}
else {
SetNextCursorMode();}
}

There I took them out or did I take something out I wasn't supposed to.

And I don't know what they are supposed to do this is my first game and im trying to get to grips with scripting all I can do is explain as best I can so here it goes.

What I need is when you open the inventory window inside a game and click on the inventory item which is number 1 and then the cursor turns into that inventory item right. Then I need it so when you click anywhere on the screen while in that cursor that the Load Sava and Quit dialog appears and the dialog being number 7.

Ishmael

Um... sorry if I'm bieng stupid, but I don't understand... could you put that in steps, like

1. Click a button
2. Open GUI #

etc. (just an example)
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Plog

1. Open inventory
2. Click on inventory item 1.
3.Inventory item 1 appears as cursor.
4. Click anywhere on the screen.
5. Open Dialog 7.

4 and 5 are the ones I need scripted.

Ishmael

the script you need: (I believe)

in on_mouse_click:

if ((button==LEFT) && (character[EGO].activeinv==1) && (GetCursorMode()==4)) {
 RunDialog(7);
}
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Plog

What do Itake out of this and where do I put the new script you just gave me?

function on_mouse_click(int button) {
if (IsGamePaused() == 1) {
}
else if (button==LEFT) {
ProcessClick(mouse.x, mouse.y, GetCursorMode() );
if (GetCursorMode()==8) {
InventoryScreen();
}
}
else {
SetNextCursorMode();}
}

TK-BeingLazy

function on_mouse_click(int button) {
if (IsGamePaused() == 1) {
}
if ((button==LEFT) && (character[EGO].activeinv==1) && (GetCursorMode()==4)) {
RunDialog(7);
}
else if (button==LEFT) {
ProcessClick(mouse.x, mouse.y, GetCursorMode() );
if (GetCursorMode()==8) {
InventoryScreen();
}
}
else {
SetNextCursorMode();}
}  

:P

and btw

Quoteif (GetCursorMode()==8) {
InventoryScreen();
}

What is this supposed to make? I mean whats the idea of opening inv screen if the cursor mode is 8 when you click on the screen..? :J

Plog

I Just didnt like the GUI so I made anew way to make the inventory come up and now im working on geting save load and quit  up you see.

gogeta2000


Ishmael

Very offtopic, and unneeded, but: what does that mean?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk