healthpotion (RPG)

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the when posting support requests.

User avatar
wildflower
Member
Member
Posts: 76
Joined: August 11th, 2011, 5:10 am
Name: Sandie
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

healthpotion (RPG)

Postby wildflower » January 14th, 2012, 11:50 am

How do I make a healthpotion? (or any kind of potion)

I know how to make the model and how to use it as a item in the game, but that's as far as I can come.
I suspect that it has something to do with concumables, but the only health-related I have figured out is r_health_get and there doesn't seam to be a r_health_set.
A work in progress :

Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: healthpotion (RPG)

Postby Hirato » January 14th, 2012, 10:24 pm

You'd want to add a health related status group to the item, but with that said, consumables aren't implemented yet.

The easiest way to work around this is to rely on healing abilities...

There is slightly more difficult way...
You will need to define the health potion as a weapon with a target of T_SELF, a use cost of 1 and it must reference an ammotype.
The ammotype should contain one item entry, that of the health potion you're consuming.

That setup is more intended for throwing weapons (knives, bombs, rocks, etc) but it should suffice.
This is not a url, clicking it is pointless

User avatar
wildflower
Member
Member
Posts: 76
Joined: August 11th, 2011, 5:10 am
Name: Sandie
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: healthpotion (RPG)

Postby wildflower » January 21st, 2012, 11:52 am

I have spent several hours trying to figure this out :oops:
But I still don't understand how it is possible to set the amount of health a potion gives?

I'm not a particular skilled programmer, but I'm an awesome "cut&paste"-er ;-)
Unfortunately there doesn't seam to be any PAS-projects (rpg) that use potions or healing?
A work in progress :

chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: healthpotion (RPG)

Postby chocolatepie33 » January 21st, 2012, 9:10 pm

I'm not so sure about this, I thought I saw something somewhere about potions having damage variables of "-1" to restore health. Would that work?

User avatar
kddekadenz
Member
Member
Posts: 423
Joined: July 17th, 2011, 11:02 am
Name: kdd
Contact:

Re: healthpotion (RPG)

Postby kddekadenz » January 22nd, 2012, 4:08 am

-2 is health, -1 is mana (correct me if I'm wrong).
I'm on it. I managed it already that it can heal you, now I just need to create the ammo.

EDIT: 'r_ammo_additem is a unknown command' :(
How is the correct command?
is an advanced RPG beeing developed in Sandbox

User avatar
kddekadenz
Member
Member
Posts: 423
Joined: July 17th, 2011, 11:02 am
Name: kdd
Contact:

Re: healthpotion (RPG)

Postby kddekadenz » January 31st, 2012, 3:17 am

@hirato: Could you please give me the right command (read prev post)?
is an advanced RPG beeing developed in Sandbox

User avatar
wildflower
Member
Member
Posts: 76
Joined: August 11th, 2011, 5:10 am
Name: Sandie
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: healthpotion (RPG)

Postby wildflower » January 31st, 2012, 9:59 am

I'm happy to hear that I'm not the only one having problems with this :-)
A work in progress :

User avatar
wildflower
Member
Member
Posts: 76
Joined: August 11th, 2011, 5:10 am
Name: Sandie
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: healthpotion (RPG)

Postby wildflower » February 1st, 2012, 6:46 pm

A work in progress :

User avatar
jSoftApps
Member
Member
Posts: 426
Joined: May 2nd, 2011, 10:02 pm
Name: J.R.
IRC Username: jSoftApps
Location: jSoft Apps Software Innovations HQ
Contact:

Re: healthpotion (RPG)

Postby jSoftApps » February 1st, 2012, 6:51 pm

This is really good coding. I might have to use this
jSoft Apps Software Innovations - App, Games and More!


Image

jSoft Apps is now on indie db!

User avatar
wildflower
Member
Member
Posts: 76
Joined: August 11th, 2011, 5:10 am
Name: Sandie
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: healthpotion (RPG)

Postby wildflower » February 1st, 2012, 7:14 pm

A work in progress :


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Sandbox General Support”

Who is online

Users browsing this forum: No registered users and 6 guests