Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
Quick and dirty hands-on approach to PAS-RPG
-
- Member
- Posts: 194
- Joined: August 10th, 2011, 2:35 pm
- Name: Addis
- IRC Username: javaxbeast
- Location: Chicago, IL
- Contact:
Re: Quick and dirty hands-on approach to PAS-RPG
Hey, sorry for being the stupid one here, but can someone explain the r_loop_inv command? Also, CP, I understand Hirato's tutorial. The addendum helped a lot. Thanks for those great tuts, Hirato and wildflower!
Age of Darkness
Maps: Music:
Models:
Scripts:
Other:
Visit the company website: (In progress (Expected to be released in two weeks :uber:)



Visit the company page on ModDB: Vulcanis Entertainment
java.x.beast wrote: I got them moves like JAGger!!!
-
- Support Team
- Posts: 2734
- Joined: January 13th, 2010, 12:42 pm
- Name: Timothy
- IRC Username: I use Steam
- Location: Looking over your shoulder...
- Contact:
Re: Quick and dirty hands-on approach to PAS-RPG
Correct me if I'm wrong Hirato.
Java, you're invoking a loop of the inventory. However, each time it "finds" the item it'll add a new stat instead of overwriting the other one. Then it'll also get the proper amount as well. At least, from looking at it that's what I see.
Java, you're invoking a loop of the inventory. However, each time it "finds" the item it'll add a new stat instead of overwriting the other one. Then it'll also get the proper amount as well. At least, from looking at it that's what I see.

Want a user bar like this one? PM Leo!
Re: Quick and dirty hands-on approach to PAS-RPG
You probably do not want to give the player the raw indices, so the following would probably be a better scriptwildflower wrote:I added a line to echo what is being looted and updated the howto with the new loot code.Code: Select all
r_loop_inv self item [ // If dead, then loop through the inventory echo (format "You find %1 %2" (r_get_amount item) (r_get_name item)) // for every item echo amount and name r_additem player (r_get_base item) (r_get_amount item) // add to player inventory r_remove self (r_get_base item) (r_get_amount item) // remove from npc inventory ]
Code: Select all
r_loop_inv self item [ // loop through the inventory of self, iteratively assigning the items to item
r_select_item (r_get_base item) [ //select the item's definition based on its index
echo (format "You found %1 x %2" (r_get_amount item) (r_item_name_get)) //prints the amount and the item's name
]
r_additem player (r_get_base item) (r_get_amount item) // add to player inventory
r_remove self (r_get_base item) (r_get_amount item) // remove from npc inventory
]
This is not a url, clicking it is pointless
- wildflower
- Member
- Posts: 76
- Joined: August 11th, 2011, 5:10 am
- Name: Sandie
Re: Quick and dirty hands-on approach to PAS-RPG
I'm sorry to say that I have no idea why it's bad to give raw indices, but since you actually know what you are talking about (in stark contrast to me), I'll go with your solutionHirato wrote:You probably do not want to give the player the raw indices, so the following would probably be a better script

A work in progress : http://www.moddb.com/mods/moonvalley
-
- Support Team
- Posts: 2458
- Joined: April 27th, 2010, 5:31 pm
- IRC Username: CP
Re: Quick and dirty hands-on approach to PAS-RPG
java.x.beast wrote:Also, CP, I understand Hirato's tutorial. The addendum helped a lot. Thanks for those great tuts, Hirato and wildflower!
Hmmm... Looks like I should take another look at that section.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
-
- Member
- Posts: 194
- Joined: August 10th, 2011, 2:35 pm
- Name: Addis
- IRC Username: javaxbeast
- Location: Chicago, IL
- Contact:
Re: Quick and dirty hands-on approach to PAS-RPG
I think I get the "r_loop_inv" command now. Correct me if I'm wrong, but are we not supposed to replace "item" with the name of the item? If so, I understand! If not, I'm stupider than Dumb and Dumber put together.
Age of Darkness
Maps: Music:
Models:
Scripts:
Other:
Visit the company website: (In progress (Expected to be released in two weeks :uber:)



Visit the company page on ModDB: Vulcanis Entertainment
java.x.beast wrote: I got them moves like JAGger!!!
-
- Member
- Posts: 194
- Joined: August 10th, 2011, 2:35 pm
- Name: Addis
- IRC Username: javaxbeast
- Location: Chicago, IL
- Contact:
Re: Quick and dirty hands-on approach to PAS-RPG
I'm working on a video tutorial. It'll be out soon enough.
Age of Darkness
Maps: Music:
Models:
Scripts:
Other:
Visit the company website: (In progress (Expected to be released in two weeks :uber:)



Visit the company page on ModDB: Vulcanis Entertainment
java.x.beast wrote: I got them moves like JAGger!!!
- wildflower
- Member
- Posts: 76
- Joined: August 11th, 2011, 5:10 am
- Name: Sandie
Re: Quick and dirty hands-on approach to PAS-RPG
No you don't have to replace anything for this to work, every time the loop finds an item it is defined as "item", so when you later call "r_get_amount item" you get the amount of "item", to simplify:java.x.beast wrote:I think I get the "r_loop_inv" command now. Correct me if I'm wrong, but are we not supposed to replace "item" with the name of the item? If so, I understand! If not, I'm stupider than Dumb and Dumber put together.
Look in inventory for items, if an item is found, call it "item" so you can reference it later as "item"
remove "item" from npc
add "item" to player
repeat (when the loop goes through second time and a new item is found, it becomes "item")
A work in progress : http://www.moddb.com/mods/moonvalley
-
- Member
- Posts: 2
- Joined: December 31st, 2011, 9:37 am
- Name: jay
Re: Quick and dirty hands-on approach to PAS-RPG
so how would I reset the map without changing the folders in my directory?
EDIT: If you didnt get what I ment, I ment if I made a new game, it would go to PlatinumArtsSandbox2.7.1\my_stuff\data\rpg\saves, not PlatinumArtsSandbox2.7.1\data\rpg\games...so I dont know what to do
EDIT: If you didnt get what I ment, I ment if I made a new game, it would go to PlatinumArtsSandbox2.7.1\my_stuff\data\rpg\saves, not PlatinumArtsSandbox2.7.1\data\rpg\games...so I dont know what to do
