Aller au contenu

Photo

Looking for general digging/treasure script


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
Boozehound Blue

Boozehound Blue
  • Members
  • 64 messages
In my case, I'm digging up bodies in unmarked graves; but I could also use it for happy treasure.

Idea was simply a trigger that checks if some condition has been set (+pc has shovel item) when pc enters, then prompts (an invisible object) dig? conversation, either equips a shovel item (or plays a special effect of shovel in hand), plays shoveling animation, perhaps spawns a dirt mound(?), then the appropriate treasure blueprint, and finally removes shovel vfx (if used) and destroys (or resets) self. Perhaps it can relay a short stored string message or update a journal.

#2
kamal_

kamal_
  • Members
  • 5 260 messages
it's done in one of the Purgatorio demos. There is a quick quest involving digging with a shovel..

#3
PJ156

PJ156
  • Members
  • 2 988 messages
And at the beginning of the wizards apprentice. MR may jump in here but I think there were size issues where the wee folk had trouble handling the shovel object.

PJ

#4
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
There is an animation for digging. Its called something like: ANIMATION_LOOPING_SHOVELLING. There is an item from SOZ that is a shovel. I think it's called the garden spade. Just make a script that gives the PC the shovel (or have it laying on the ground), then equips it to the Right Hand slot, then make the PC do the digging animation. Spawning the dirt pile is a good idea and nice touch.

You will run into problems if anyone is using a small (halfling, or gnome) creature because the animation does not support 2 handed weapons. I just did the digging animation without the shovel for small creatures.

#5
Dann-J

Dann-J
  • Members
  • 3 161 messages
Dark Waters has a fantastic buried treasure system. You find treasure maps with coordinates on them, then use a sextant to navigate. Once you think you're in the right spot you activate a shovel item and, if you're in the right place, the player digs with a cut-scene shovel and gains the treasure.

Modifié par DannJ, 22 mai 2011 - 10:27 .


#6
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Sextant? Navigate? How does that work? Custom UI? That's amazing!

#7
Shaughn78

Shaughn78
  • Members
  • 637 messages
I would suggest creating an item with a unique ability self-only. When the item is used the script will cause the player to do the digging animation for a short while. It will also check the distance between the nearest ipoint and the player. If the player is within a certain distance, then they dig up that spot. You can spawn in a placeable, like a lootable skeleton, or an item. If the player is outside the distance, then they do their digging followed by a nice voice chat cuss.

I would use an ipoint instead of a waypoint because you can store different variables. You can have a default placeable lootable that would have random treasure to simplify the system (global treasure script). A local string could be checked, and if it isn't "" then it would spawn in a unique placebale using the string as the ref. You can also check for the chance of digging up an undead creature to add a bit of adventure to grave robbing.

At the end of the script you would either need to set a variable on the ipoint to prevent digging there again or just destroy it. Checks in the script can also stop the script to prevent the animation when inside buildings, hard to dig through those stone floors.

#8
Boozehound Blue

Boozehound Blue
  • Members
  • 64 messages
I had something written up along those lines, but it wasn't working. Need to pull it out and test it on its own. I think I used a playcustomanimation wrapper with "shoveling", as opposed to the constant int, so the animation never played. I never found the 'treasure' either, just activated my shovel like an idiot....

#9
The Fred

The Fred
  • Members
  • 2 516 messages

M. Rieder wrote...

Sextant? Navigate? How does that work? Custom UI? That's amazing!

Dark Waters doesn't have a custom UI, at least not for this (or I missed it) but it does have sextants. Basically, using the sextant tells you your coordinates. You normally have some sort of treasure map which tells you the cooredinates of the treasure. When the two match up, you dig.