Can you limit the amount of idems you carry to say 25 and you can't carry any more than that?
------------------
Thanks,
GrahamVH
Well you could probably increment a global variable everytime you add something to your inventory. But first it checks that variable to see if you have room.
gallandro
------------------
"(Even though you just obliterated a fleet of Galaxy Destroyers) Prepare to die!" says the confederate gunboat pilot.
Quote
Originally posted by Gallandro:
**Well you could probably increment a global variable everytime you add something to your inventory. But first it checks that variable to see if you have room.
gallandro
**
how would I get it to happen when something is added? I do not know how to execute a action when something is added.
------------------
Thanks,
GrahamVH
There isn't a linkable "added to inventory" action as such; you would need to use some event scripting to fake it. Instead of allowing the player to pick items up directly, you would have an item on the map which, when the player touches it, checks to see if he has room, and if so, adds the "real" item to his inventory and deletes itself from the map. You would also have to create your own substitute for the normal shop system (via Main locations, perhaps), so that items being purchased would also check for inventory space before the player buys them.
------------------
"I hate quotations." - Ralph Waldo Emerson
Hey all
sorry Glenn but I disagree
I believe this basic Coldstoning to add an item to the players you use the item wizard right? so the CGE will evaulate a conditional everytime the player picks up an item. you set this up in the item editor
just make a global varible for the inventory count and add 1 for each item picked up and a negative outcome when needed.
see page 50 of the CGE manual.
stray
~{edited for snideness}~
------------------
"A Happy Wife, A Happy Life."
See CGE_Tips at: (url="http://"http://coldroom.150m.com/CGE_Stuff/CGE_Tips.html")http://coldroom.150m...f/CGE_Tips.html(/url)
(This message has been edited by straytoaster (edited 06-07-2002).)
You're right, straytoaster - I'd forgotten that items on a map can have a conditional and action link. So you could do item pick-up on a map directly through this functionality.
However, you would still need to script around the usual "Shop" functionality, as, as far as I can tell, there are no conditionals or action links associated with purchasing items normally through a shop. (If I'm wrong about this one too, I'll be as thrilled as anyone - it would be great if this functionality were built-in.)
------------------
"I hate quotations." - Ralph Waldo Emerson
as for shops page 36 in the CGE manual.
three solutions:
I believe you could add a 'event link' that would check a global when the player whent to the 'location' that is your shop (In PoG the 'location' was the NPC's). or with the General page on the shop creation page. or if you want to tempt the player but not let him buy things you could add a conditional event check that would look at the inventory global to the 'not enough gold' event check which is in the shop interface.
Glenn- you can be thrilled now
~stray
p.s. its 4am so if this doesnt make sense ..... i'll edit it later... I know what i mean
------------------
"A Happy Wife, A Happy Life."
See CGE_Tips at:
http://coldroom.150m...f/CGE_Tips.html
Sorry straytoaster - no thrill yet :). I'm afraid I don't quite follow any of your three suggestions, but I'll risk making myself looking foolish and respond to them as well as I understand. Forgive me if I misunderstand you completely.
If you check the global before the player enters the shop, you could prevent the player from entering the shop at all if his inventory were "full". But once he's in the shop, what's to stop him from loading up on as many items as he can afford?
I assume you're referring to the global and local "initialization events" on the General pane. These events are also (AFAIK) only called when the player enters the shop, so the same issue as with 1) would seem to apply here.
I don't see how this would work. The "don't have enough gold" event is not a conditional check, it's an event that is only called when the player tries to buy something too expensive. It would only be called (for your global check) when the player tries to buy something he can't buy anyway, and would not stop him from buying the things he can afford.
I await your response with anticipation of thrill.
------------------
The more time I mess around programming in Cocoa with InterfaceBuilder, the more I learn to hate the bastardized false-Aqua that RealBasic creates.
Give us a truly OS X-native Coldstone!