[RESOLVED] Enemies drop moneybags?

Started by Rymdpotatis, July 19, 2008, 05:40:00 pm

Previous topic - Next topic

Rymdpotatis

July 19, 2008, 05:40:00 pm Last Edit: July 21, 2008, 08:07:54 am by Blizzard
Is it possible to make enemies drop moneybags that when you pick them up you get cash?

Phasedscar

July 19, 2008, 05:58:06 pm #1 Last Edit: July 19, 2008, 05:59:24 pm by Phasedscar
One way you can do it is have a dummy item called Money Bag that has a chance to drop with Multi-Drop from tons.  Then have a parallel event running that says:

Conditional Branch: Inventory: Money Bag
>Change Variable: 001 Character Level: Character level
>Change Variable: 002 Money modifier: Rand 1-10
>Change Variable: 001 Character Level * 002 money modifier
>Change Money: Variable: 001 Character level
>Change Inventory: -1 Money Bag
>Wait 0.1 frames
Else
>Wait 0.1 frames
End

This should give you gold equal to anywhere from your character's level to ten times of his level.  You can change the modifier easy if you want.  This is just a basic idea.  You could have things that look like this...

Conditional Branch: Inventory: Money Bag
>Change Variable: 001 Character Level: Character level
>Change Variable: 002 Money modifier: Rand 1-10
>Change Variable: 001 Character Level * 002 money modifier
>Change Money: Variable: 001 Character level
>Change Inventory: -1 Money Bag
>Wait 0.1 frames
End
Conditional Branch: Inventory: Big Money Bag
>Change Variable: 001 Character Level: Character level
>Change Variable: 002 Money modifier: Rand 10-50
>Change Variable: 001 Character Level * 002 money modifier
>Change Money: Variable: 001 Character level
>Change Inventory: -1 Big Money Bag
>Wait 0.1 frames
End
Conditional Branch: Inventory: Massive Money Bag
>Change Variable: 001 Character Level: Character level
>Change Variable: 002 Money modifier: Rand 50-100
>Change Variable: 001 Character Level * 002 money modifier
>Change Money: Variable: 001 Character level
>Change Inventory: -1 Massive Money Bag
>Wait 0.1 frames
End
Wait 0.1 frames
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Rymdpotatis

A million thanks! It works perfectly. And so easy to understand too! =D

Phasedscar

one of the neat things about that kind of set up is it scales well with the progression of your game since it's based off of character level.  And it's simple to program.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

Not only that, this should work without Multi-Drop as well and with Blizz-ABS, too, even though in Blizz-ABS you can activate the option to make enemies drop gold, but that's not the same.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Phasedscar

Could also make it so there's items in the game that take money away instead of adding money.

Not sure of the use of that, but it's an option.

Also, you can make it so that you have to turn in items at a NPC and get random rewards.  That requires a little extra scripting but it's the same basic principle.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

Why would it require scripting? Make stuff drop as normal items and just make an event that does all the job with a reward system.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Phasedscar

I actually meant event scripting, not ruby.  Then the rest as basically what you said.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.