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.
Looking for general digging/treasure script
Débuté par
Boozehound Blue
, mai 22 2011 08:00
#1
Posté 22 mai 2011 - 08:00
#2
Posté 22 mai 2011 - 12:20
it's done in one of the Purgatorio demos. There is a quick quest involving digging with a shovel..
#3
Posté 22 mai 2011 - 01:08
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
PJ
#4
Posté 22 mai 2011 - 06:34
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.
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
Posté 22 mai 2011 - 10:25
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
Posté 23 mai 2011 - 06:17
Sextant? Navigate? How does that work? Custom UI? That's amazing!
#7
Posté 23 mai 2011 - 07:17
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.
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
Posté 23 mai 2011 - 08:30
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
Posté 23 mai 2011 - 08:35
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.M. Rieder wrote...
Sextant? Navigate? How does that work? Custom UI? That's amazing!





Retour en haut






