Closed benloh closed 1 year ago
@jdanish Please let me know if you see any other references to agent
. The wizard should allow you to select the right value now. You may need to change older scripts manually.
One error so far. I replaced agent. with character. in the attached script and it generated this error
I just committed that version of the beavers_story to art-assets under the branch "convert_agent_to_character" (736c93ec36f65b6912b4b40dbd67493b5c84518e) so you can test it
@jdanish One more try. Changing agent
to character
is a pretty deep change, so there might be more of these errors. The proper way might be to change ALL references from agent
to character
, but that level of change could easily eat up a week. We're trying a cheaper approach where we're doing the mapping primarily on the wizard side.
Closer! Now the issue is in the expression evaluation. The same script loads, but when I press start we get this error.
Hmm...I did try running the script but I'm not seeing any errors. Did you change the script by any chance? I'm not seeing any errors with any of the Beavers projects.
I’ll take a look but did you use character controller to add players to the model?
Ah, I didn't realize you were using Character Controllers.
Always to test interactions locally.----(from my iPhone)Joshua Danishhttp://www.joshuadanish.comOn Aug 20, 2023, at 12:55 PM, benloh @.***> wrote: Ah, I didn't realize you were using Character Controllers.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@jdanish Off-topic: If we could ask you to add a
Yes happy to but whatever you are asking me to add appears to not be showing up. Carriage return?
Yes happy to but whatever you are asking me to add appears to not be showing up. Carriage return?
LOL, sorry I used <return>
in the text, and it showed up blank. Yes extra carriage return. Sorry to waste your time on this, but the time was starting to add up.
One error so far. I replaced agent. with character. in the attached script and it generated this error
@jdanish I can't seem to reproduce this error. Just checking a few things:
dev-bl/agent2character
branchnpm run gem
(better yet, close the terminal in case there was an errant process running).It's in the wetlands_beaver_story script (see attached above), if you run two "players" using character controller and then have them touch which triggers this code:
`when Player firsttouches Player [[ // weird bug that means we need to make sure we are not bumping into ourself ifExpr {{ character.getProp('trackerId').value != Player.getProp('trackerId').value }} [[
// ✏️ LETS CHANGE THIS: what do specific kinds of costumes do when they bump into specific other costumes
// ✏️ This example triggers when someone pretending to be a beaver bumps into a tree
// ✏️ You can change the two costumes to be something else and then set what happens
ifProp character.costumeType equal 'Beaver' [[
ifProp Player.costumeType equal 'Tree' [[
propPush character.trackerId
featPropPop character.Graphing.text
// ✏️ Make a popup
featCall Player.Population createCharacter PopupEffect [[
prop PopupEffect.textToUse setTo 'Ooh, yum yum!'
prop PopupEffect.costumeToUse setTo ''
]]
// ✏️ Add something to the label
// featProp character.Graphing.text add ' (ate)'
// ✏️ Do something with the meter
// TBD
]]
]]
]] ]]`
I'd guess it is the call to character.getProp('trackerId').value that is doing it?
Ah thanks. Now I see it. Did this ever work? I'm surprised you can get away with two Player
references. Did it used to work with agent
in place of character
?
I suspect this is going to require a pretty deep refactor.
Yup, it all worked up until this most recent branch. I changed all of the characters that didn't work back to agents and this now works again. The current script is attached.
Given the need to refactor, I'm OK not fixing the cases where it is an ifExpr since those are only used by advanced users in special cases. However, in other cases such as featPropPush agent.Costume.width
that seems like a scoping / nesting issue based on prior errors, and I am hoping is easier to fix?
@jdanish I think I have the ifExpr
issue resolved now. As far as I can tell the Player character does seem to run without errors.
You might check to make sure the code actually behaves like you expect it to. The fact that there are no errors should mostly be an indication that it works. Please pull and retry.
Sorry, missed one commit: 08f9fa2180e92d3e734bc960f3aa9d4702d56e29
We see the following error still
I think it is in this code which is triggered by one player becoming a beaver, then one becoming a tree, then they touch.
`when Player firsttouches Player [[ // weird bug that means we need to make sure we are not bumping into ourself ifExpr {{ character.getProp('trackerId').value != Player.getProp('trackerId').value }} [[
// ✏️ LETS CHANGE THIS: what do specific kinds of costumes do when they bump into specific other costumes
// ✏️ This example triggers when someone pretending to be a beaver bumps into a tree
// ✏️ You can change the two costumes to be something else and then set what happens
ifProp character.costumeType equal 'Beaver' [[
ifProp Player.costumeType equal 'Tree' [[
propPush character.trackerId
featPropPop character.Graphing.text
// ✏️ Make a popup
featCall Player.Population createCharacter PopupEffect [[
prop PopupEffect.textToUse setTo 'Ooh, yum yum!'
prop PopupEffect.costumeToUse setTo ''
]]
// ✏️ Add something to the label
// featProp character.Graphing.text add ' (ate)'
// ✏️ Do something with the meter
// TBD
]]
]]
]]`
This is the script from the prior comment
@jdanish All keywords that reference agent objects should now properly use character
instead of agent
. a374ca645e63a0216ec7cce1baa1993745a241a6
I believe the remaining unmarked checkboxes are not relevant to use of character
.
Looks like it is working!!
Added a stub of a wiki page to cover use of character
: https://github.com/theRAPTLab/gsgo/wiki/Character
Also noting there is a test script for all keywords here: https://github.com/theRAPTLab/gsgo/wiki/Debugging
References to
agent
in ScriptEditor / line editor should now properly refer toagent
instead ofcharacter
.For example:
Addresses #756