Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Event system and taking away gold.


TheLordOfTheManor
 Share

Recommended Posts

I made a costume system (more like plastic surgery system) in my game using the event system, basically you pay and your sprite is permanently changed to something else. The only problem is I use:

Take 1000 Gold away from player

Set Player Sprite to X

The problem with this is that when I have >1000 gold it takes away all current gold and changes the sprite instead of exiting.

For example:

I have 450 gold.

Costume costs 1000 gold.

I talk to costume man and click on buy.

All of my gold is subtracted. (450-1000=-550) (Though of course the game doesn't count negative so your money goes to 0).

My sprite is still changed to sprite 16.

IT EVEN WORKS WHEN I HAVE 0 GOLD.

Where in the event system code can I make a check checking if you have enough gold to pay and if not it exits the event?

Thanks for the help.
Link to comment
Share on other sites

Normally you would simply use a Conditional Branch to check for Gold and the amount required. The problem is the current Event System doesn't allow you to check for the amount required. It only checks if the player has 1 of an item (Gold), then it runs it if they do.

Besides using a very lengthy work around converting it using a Variable, a source edit would be best.
Link to comment
Share on other sites

Well, it's possible.. But it's quite a mess, first of you should find the option(s) you want to edit on the form and add the changes to it, then figure out how the event system stores data, then link the form changes to that.. THEN you need to find the place the server handles these commands and change those locations.

It's tricky mostly because the code is a mess, but doable.
Link to comment
Share on other sites

> Well, it's possible.. But it's quite a mess, first of you should find the option(s) you want to edit on the form and add the changes to it, then figure out how the event system stores data, then link the form changes to that.. THEN you need to find the place the server handles these commands and change those locations.
>
> It's tricky mostly because the code is a mess, but doable.

Crap, I needed this for my game, time to learn some more vb.
Link to comment
Share on other sites

> This isn't a bug…the taking away items label wasn't made for gold specifically, so, what can you expect?

I still wasn't planning on using his event system anyways. ![<_<](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/dry.png)

And yes I understand that it wasn't added but it obviously should have been! It was forgotten about.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...