BabboNatale Posted February 17, 2009 Share Posted February 17, 2009 E' possibile poter limitare la capacità dell'inventario? Ad esempio che si possono portare solo 20 oggetti oppure limitare il numero, tipo non più 99 pozioni ma bensì 20.Grazie http://i59.tinypic.com/n37n6e.pnghttp://i57.tinypic.com/29lokti.png Link to comment Share on other sites More sharing options...
0 MasterSion Posted February 17, 2009 Share Posted February 17, 2009 (edited) Allora vai su game_partyriga 176def gain_item(item_id, n) # Update quantity data in the hash. if item_id > 0 @items[item_id] = [[item_number(item_id) + n, 0].max, 99].min end endcambi il 99 con 20 per esempio se invece vuoi solo ad esempio le pozioni (ID.1) def gain_item(item_id, n) # Update quantity data in the hash. if item_id = 1 @items[item_id] = [[item_number(item_id) + n, 0].max, 20].minelse item_id > 0 @items[item_id] = [[item_number(item_id) + n, 0].max, 99].min end end end( scritto al volo ci potrebbero essere parecchi errori ) se continui a guardare le linne sotto trovi le stesse identiche def per le armor e le weapon basta che cambi il 99 come per gli oggetti Edited February 17, 2009 by MasterSion http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
0 nihil-omen Posted May 3, 2009 Share Posted May 3, 2009 Ed oltre a questo (che devo ancora provare) si può fare che i tipi di oggetti totali possono esser limitati anch'essi?Magari legandolo ad una variabile?Chessò la variabile 25 del gioco si chiama "Capacità Inventario" e il numero massimo di slot di oggetti che uno può portare è quello.E ancora più bello che se uno vuole portare più di 20 Pozioni, occupa 20 Pozioni su uno slot e (fino ad altre 20) le altre su un altro slot, andando avanti così, uno si può portare 2000 Pozioni, ma non avrebbe posto per altre cose nell'inventario ò_oGià ho chiesto cose simili XD (vorrei implementare sta cosa nel Compact Menù, lì ho già scritto, ora scrivo pure qua, chissà prima o poi qualcuno saprà aiutarmi *_*) http://i30.tinypic.com/xehois.gif} 2rA - web site {E' disponibile il primo capitolo completo di 2rA!} 2rA: Capitolo I { Link to comment Share on other sites More sharing options...
Question
BabboNatale
E' possibile poter limitare la capacità dell'inventario? Ad esempio che si possono portare solo 20 oggetti oppure limitare il numero, tipo non più 99 pozioni ma bensì 20.
Grazie
http://i59.tinypic.com/n37n6e.png
http://i57.tinypic.com/29lokti.png
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now