Error. Using Pixie combat library

Leon Kitsune
I'm not to sure what I can do to fix this. :/ I'm using the library so I used the GUI to set most of the stuff. I'll paste the error message and if you need a specific code strand I will paste that upon request.

Error running script: Error compiling expression 'GetRandomInt (1, 20) - this.defence + game.pov.attack': ArithmeticElement: Operation 'Add' is not defined for types 'Int32' and 'Object'
Error running script: Error compiling expression 'GetRandomInt (1, 20) - game.pov.defence + this.attackbonus': ArithmeticElement: Operation 'Subtract' is not defined for types 'Int32' and 'Object'

Pertex
Hmm, this message says that this.defence and this.attackbonus is not an integer variable. Perhaps you have to initialize this variables with an integer value

jaynabonne
Looks like it could actually be game.pov.attack and game.pov.defence that are undefined (based on the error messages).

jaynabonne
This page has info on it:

http://quest5.net/wiki/Simple_Combat_System_(Advanced)

In particular, under the section on the player object, it shows this as an example:

   <object name="player">
<inherit name="defaultplayer" />
<attack type="int">2</attack>
<defence type="int">0</defence>
<armour type="int">0</armour>
<hitpoints type="int">25</hitpoints>
<status>-</status>
<statusattributes type="stringdictionary">status = ;equippedstatus = !</statusattributes>
<equippedstatus>Wielding: nothing</equippedstatus>
</object>

Leon Kitsune
Adding the attributes didn't do much. I copypasted the code and all it changed was my status attributes. Do the attributes need a specific script or something for them to work. The tutorial was a bit unclear. Since I have the library a lot of the coding is already there its just a matter of working out kinks with the attributes

HegemonKhan
possibly:

did you set your 'player' as the game.pov:

<game name="blah">
<pov type="object">player</pov>
</game>

jaynabonne

did you set your 'player' as the game.pov:



You don't need to. "player" is used as the default game.pov if none else is set.

Leon Kitsune
Sooo I fixed everything but I ran into a annoying issue. Dead monsters are attacking still and the monster object type was going unknown for whatever reason. After several tests i found out the library has bugs. This was tested in the Combat Demo.
Something in here is messing up my game.

jaynabonne
There are two bug fixes listed in this thread:

viewtopic.php?f=10&t=4373

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums