Menu

Show posts

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

Messages - Siddd

#1
from what ive been told there is no code before it =S its just that in a new script named 1.asc
#2
and ive tried that before:


if (hello==1) {
player.Say("I must have that item!");
cGarry.Say("Okay, it costs 5g.");
if (game.score>=5) { // 5 is price of thing you are buying
  player.AddInventory(iPoster);
  GiveScore(-5);
  cGarry.Say("You bought a realy great item!");
  dSelling.SetOptionState(1, eOptionOff);
  }
  else {
  cGarry.Say("You don´t have enough money!");
  }
}
}

but it comes up 'unexpected if' for the first line.
#3
i just want to thank you all for your help and that im gonna give it a few more tries. ive printed out virtually the whole manuel and made it into a book (Y). haha
#4
well basically all i want is for "Garry" to sell an item that costs 1 point which is deducted from my score or whatever and if i have not enough money then itl say sorry blah blah. so i suppose just dialog_request.
#5
ive even tried changing the name 'money' to something that i would definately not use in this case 'cash' but still its a no-go.
#6
i have just checked through everything and found only one other word that was money. at that point i was quite excited and i thought if i changed it then all would work but im afraid it didnt make a difference! ill continue searching through to see if i can find anything else but i dont think ill find anything.
#7


i was told to put it into a new script and the error:

---------------------------
Adventure Game Studio
---------------------------
Script link failed: Runtime error: unresolved import 'money'

---------------------------
OK   
---------------------------
#8
Tried that and your right but i dont see how the problem could be in a room script as they arnt really connected in this case.

this is so annoying! and who said using the points for money is easy? Some rocket scientist no doubt.
#9
nooo. it didnt work. maybe i put it in the wrong place? i put it after is says //END OF CONTROL PANEL FUNCTIONS
#10
ive acheived what needs to be done on this but ive made a new post with yet another damn problem.
#11
ok ive checked every page to do with this and i cant find the sollution so:

here is what ive done:

EDIT - In a new script: (tried putting it in global .ash .asc ect none work)


import int money;
function dialog_request (int hello){
if (hello==1) {
player.Say("I must have that item!");
cGarry.Say("Okay, it costs 5g.");
if (money>=5) { // 5 is price of thing you are buying
  player.AddInventory(iPoster);
  money-=5;
  cGarry.Say("You bought a realy great item!");
  dSelling.SetOptionState(1, eOptionOff);
  }
  else {
  cGarry.Say("You don´t have enough money!");
  }
}
}




and then in the global script:

int money = 10;  //Will give the player 10 dollars to start with
export money;


however it comes up unresolved import when ive done everything (or so i think) that needs to be done
#12
yay im slowly cracking it but now it comes up " undefined token 'money' " for this line:
  Money-=50;

???
#13
ok ok ok now ive done everything but i dont understand the concept of "(Money>=5)" was i suppose to create a GUI so that the money can be taken away?

i was hoping that i could just take something out of my inventory instead of money. For example you can find gold coins on the floor.
#14
Quote from: Mirek on Thu 23/10/2008 16:56:35
I´m not sure what do you want, but I will try to help you.
I created a module/ template for this, but it isn´t working now. So, if you want to use dialog for this, you have to
1. create new option in dialog with merchant,
2. add line run-script 1
3. in dialog_request add this:
Code: ags

if (parameter==1) {
 player.Say("I must have this thing!");
 cShopKeeper.Say("Okay, it costs 50 gold."); 
 if (Money>=50) { // 50 is price of thing you are buying
  player.AddInventory(iYourNewItem);
  Money-=50;
  cShopKeeper.Say("You bought a realy great item!");
  dYourDialog.SetOptionState(1, eOptionOff);
  }
  else {
  cShopKeeper.Say("You don´t have enough money!");
  }
}



ok the only bit i dont understand here is the dialogue_request bit. whats that? sorry
#15
I was wandering how i could "buy" an item off a shop keeper i made which puts the item i buy in my inventory and takes out money from my inventory. Thanks
#16
sorry this is so simple but i cant find how to do it:

how do i add music to the game? and can i add any music that i want?
#17
Hey im not sure if this is the right place to post but it seems like a hint and tips kind of thing:

does anyone know any good places where i can download good objects in bmp format?

would be very greatful.
#18
I'm unsure how to change the position of the character when he enters a new room. i know how to change it when you first start the game but not when you change rooms. anyone help?
SMF spam blocked by CleanTalk