RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Need Help with Digging Event System (RMXP)

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 83
Kidfox70. It happens.
I have a dig system that is as global as I could think of doing it. Basically where ever there is grass or dirt (and the shovel is equipped) the player can dig up the ground. There is a chance for gold. Now my only problem is not allowing for the player to dig a hole under a NPC.

I have a Common Event for the Chance of Gold and an event for the Hole. And using ter tags on the map the event can read if the Player can dig there or not.

Here is the Event code:


And here is the Common Event:


I've tried a few different things and searched around and I got nothing. I know that I could use Variables to track the NPC and restrict it that way. But that would be a lot of Variables.

I have attached a project with just the Dig Event System. If you can think of any way I can do it differently OR the same and not have to use the Variables it would be great.

Please help!! And thanks for your time. If you have any questions or feed back please tell!
« Last Edit: June 17, 2012, 10:38:59 PM by Kidfox70 »
I don't say bless you when people sneeze, cause i'm not God. Blessing people is his job. Lolo?

**
Rep: +0/-0Level 88
*vrooooom!!*
Why don't you have the player dig on the exact spot they're standing on?


You could also make the digging more rewarding, and also less rewarding.
Always digging up 1-10 gold doesn't seem right! haha

----------------------------------------------------------------
@>Control Variable 0014 - Random Number 1-10
  @>Conditional Branch: Variable [0014:] -- Less than or Equal to 5
     @>Message: You found nothing..
   :Else
      @>Conditional Branch: Variable [0014:] -- Equal to 6
        @>Message: You found 10 gold!
      :Else
          @>Conditional Branch: Variable [0014:] -- Equal to 7
             @>Message: You found a Potion!
           :Else
               @>Conditional Branch: Variable [0014:] -- Greater than or Equal to 8
                 @>Message: You found 30 gold!
                 :Else
                 : Branch End
            : Branch End
       : Branch End
   : Branch End
----------------------------------------------------------------------


Good luck!  :V
« Last Edit: January 16, 2013, 05:05:58 AM by Maytag »
Currently looking for help with some HUD scripts!
Any advice is welcome!
http://rmrk.net/index.php/topic,47471.0.html

***
Rep:
Level 85
Why not do it like this:

-the player will dig on the spot he is standing on
-just before digging (after checking if the ground is a valid target for this) the player will step away
-use move route (player) in a direction of choice with ignore if can't move
-then check if the player is still on the same x+y as before, if so let him move in another direction and repeat

For example:

loop start:
@>Conditional Branch: Variable [0011:] == player's map x
  @>Conditional Branch: Variable [0012:] == player's map y 
    Set move route: player, wait, skip
    Move at random

And for both of these conditional branches, if they are not true move the event to the player's last location (using Variable 11 and 12) and set it to become a hole, also don't forget to trigger the common event.

I hope this helped.

Kind regards,
Drakenkanon
 

***
Rep:
Level 77
RMRK Junior
I haven't used XP in years, but a bit of advice: Unless it's a minigame where you get a certain number of digs(like that island in Zelda: Phantom Hourglass) then I'd suggest getting a script or something to manage the holes appearing or you could run into problems.

***
Rep:
Level 85
I haven't used XP in years, but a bit of advice: Unless it's a minigame where you get a certain number of digs(like that island in Zelda: Phantom Hourglass) then I'd suggest getting a script or something to manage the holes appearing or you could run into problems.

I disagree, getting a seperate script for every single minigame is too much. You can't expect the forums to write hundreds of scripts for you. If it can be done with events: use events. It is not all that difficult, especially in this case.

Kind regards,
Drakenkanon
« Last Edit: April 07, 2013, 08:56:08 PM by drakenkanon »