The game keeps crashing whenever I access data that does not exist (frame/bdy/itr/etc).
While I do try to put checks all over to prevent that it still does happen and it's pretty difficult finding the error when the game just shuts down.
Could we easily catch that somehow?
edit: object has a member called umkwn1 - seems to be a movement counter (runs from 0 to 17 while walking/running - probably useful to give AI a reasonable reaction time as to when it should change targets).
While I'm at it may as well describe more of the unkwn object members:
2 seems to have a similar function to 1 - except this is for turning. It goes up to 10 when turning right and runs back down to 0 (-10 when turning left). Can give AI a reaction time to not turn around too quick.
6 is the number of the last object an object was held by (via wpoint)
14 is the number of the last object an object was thrown by (via wpoint - light weapons)
13 is the number of the last object an object was dropped by (via cpoint) scrap that - sometimes it's just anything close when the character last dropped (weapons/opponents) - probably helps AI to choose revenge/kill steal/item depending on the conditions it got knocked down
17 seems to be an object number too as it starts out with -1 like the others - but I don't know which yet
edit: I found my problem: if there are several itrs with the same kind in one frame the second one will return kind 0 and the third will crash the game (returning who knows what). (Falling characters for example have two kind 4 itrs, but the second one will read 0. Henrys flute has 3 kind 10 itrs - the second one will read 0, the third will crash the game.)
While I do try to put checks all over to prevent that it still does happen and it's pretty difficult finding the error when the game just shuts down.
Could we easily catch that somehow?
edit: object has a member called umkwn1 - seems to be a movement counter (runs from 0 to 17 while walking/running - probably useful to give AI a reasonable reaction time as to when it should change targets).
While I'm at it may as well describe more of the unkwn object members:
2 seems to have a similar function to 1 - except this is for turning. It goes up to 10 when turning right and runs back down to 0 (-10 when turning left). Can give AI a reaction time to not turn around too quick.
6 is the number of the last object an object was held by (via wpoint)
14 is the number of the last object an object was thrown by (via wpoint - light weapons)
13 is the number of the last object an object was dropped by (via cpoint) scrap that - sometimes it's just anything close when the character last dropped (weapons/opponents) - probably helps AI to choose revenge/kill steal/item depending on the conditions it got knocked down
17 seems to be an object number too as it starts out with -1 like the others - but I don't know which yet
edit: I found my problem: if there are several itrs with the same kind in one frame the second one will return kind 0 and the third will crash the game (returning who knows what). (Falling characters for example have two kind 4 itrs, but the second one will read 0. Henrys flute has 3 kind 10 itrs - the second one will read 0, the third will crash the game.)
favorite dcing techniques: wpoint | double key inputs | holding back | alternate basic moves