Page 4 of 6
Re: Dialogue System for Unity with plyGame
Posted: Thu May 11, 2017 11:28 am
by davidsibya08
Yes Sir, the MobileSingleStickControl is a Standard Asset/Cross Platform Input Prefab.
Re: Dialogue System for Unity with plyGame
Posted: Thu May 11, 2017 12:00 pm
by davidsibya08
Sir Tony,
why does my character does not receive any Experience?
I used this from your example before and also added plyGame Data Bridge to my Player.
Code: Select all
Actor["Sol"].Experience_Value = Actor["Sol"].Experience_Value =+ 2;
Re: Dialogue System for Unity with plyGame
Posted: Thu May 11, 2017 12:04 pm
by Tony Li
davidsibya08 wrote:It was set inactive but when it was already active it is not functioning anymore. My character is not moving with the joystick
but the joystick is moving,
In my test, when I deactivate and reactivate the MobileSingleStickControl GameObject the joystick still sends the correct input. Is something else going on? You may need to contact the plyGame developer if you think it's related to plyGame.
davidsibya08 wrote:why does my character does not receive any Experience?
I used this from your example before and also added plyGame Data Bridge to my Player.
Code: Select all
Actor["Sol"].Experience_Value = Actor["Sol"].Experience_Value =+ 2;
Try this:
Code: Select all
Actor["Sol"].Experience_Value = Actor["Sol"].Experience_Value + 2;
(Use "+'" instead of "=+".)
Re: Dialogue System for Unity with plyGame
Posted: Thu May 11, 2017 12:16 pm
by davidsibya08
I already contacted them, but they seemed slow to response. It's been days now.
I tried the new code and it says:
Dialogue System: Lua code 'Actor["Sol"].Experience_Value = Actor["Sol"].Experience_Value + 2;' threw exception 'Lookup of field 'Experience_Value' in the table element failed because the table element itself isn't in the table.'
Re: Dialogue System for Unity with plyGame
Posted: Thu May 11, 2017 12:42 pm
by Tony Li
Does the character named "Sol" have a plyGame attribute named Experience? Make sure it's not Exp or XP or something like that in playGame.
Re: Dialogue System for Unity with plyGame
Posted: Thu May 11, 2017 8:50 pm
by davidsibya08
I got it changed to "Player". I double checked the Attributes list and the Player got Experience and Health there, because its Class "Hero" has it.
When I tried it again there were no errors but the Experience Attribute remain unchanged to 0/0.
I tried to change the Health but nothing happened too, the Health is still 10/10.
These are my code in the script field:
Code: Select all
Actor["Player"].Experience_Value = Actor["Player"].Experience_Value + 2;
Actor["Player"].Health_Value = Actor["Player"].Health_Value - 2;
Re: Dialogue System for Unity with plyGame
Posted: Thu May 11, 2017 9:53 pm
by Tony Li
Ah, in plyGame it changed to:
- ConsumableValue = current value
- Value = max value
You can either use ConsumableValue, like this:
Code: Select all
Actor["Player"].Experience_ConsumableValue = Actor["Player"].Experience_ConsumableValue + 2;
or you can download the latest plyGame Support package from the Dialogue System Extras page and use CurrentValue:
Code: Select all
Actor["Player"].Experience_CurrentValue = Actor["Player"].Experience_CurrentValue + 2;
(Always make a backup of your project before importing any packages.) Note that the latest plyGame Support package is built for the latest version of plyGame.
Also, make sure your player has a plyGame Bridge component.
Re: Dialogue System for Unity with plyGame
Posted: Fri May 12, 2017 7:34 pm
by davidsibya08
Sir Tony,
It still doesn't add anything to my attributes. I wonder what is causing the problem.
I tried all things possible but it still remain as it is. -_-
Re: Dialogue System for Unity with plyGame
Posted: Fri May 12, 2017 8:29 pm
by davidsibya08
My option is do do scripting in terms of rewarding the player, I wanted to execute the script after completing the quest.
But is that possible? After I complete the conversation I execute the script that rewards item and attributes.
If so, you know exactly what I need to do.
Thank you Sir Tony.
Re: Dialogue System for Unity with plyGame
Posted: Fri May 12, 2017 10:04 pm
by davidsibya08
Sir Tony,
I have a quest item that will be disabled if a certain quest entry is not yet active,
but when it is active it does not become active though I think I provided the right
set of codes/blocks. When I paused the game and set the object to active then plays
the game back, it does not set any quest/quest entry state to its expected state.
It says:
[Flow/Comparison/a = b] in [Hermit Fendrel's Hammer/State 0/On AreaTrigger Enter]: Could not compare the values.
Why are these not function so well?
The On Start is working good.
The Update is not at all.
The AreaTriggerEnter Event is not working well also.
These are the blocks I made.
- ask3.png (33.77 KiB) Viewed 2669 times