Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[2.2]Programmable AI via scripting
#91
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.)
Reply
Thanks given by:


Messages In This Thread
[2.2]Programmable AI via scripting - by Boop - 06-08-2012, 06:31 PM
RE: [2.0]Programmable AI via scripting - by Boop - 06-30-2012, 01:54 PM
RE: [2.1]Programmable AI via scripting - by mfc - 07-05-2012, 10:33 AM
RE: [2.1]Programmable AI via scripting - by Boop - 07-05-2012, 11:53 AM
RE: [2.1]Programmable AI via scripting - by A-Man - 07-05-2012, 12:18 PM
RE: [2.2]Programmable AI via scripting - by A-Man - 07-19-2012, 03:08 PM
RE: [2.2]Programmable AI via scripting - by Boop - 07-19-2012, 03:15 PM
RE: [2.2]Programmable AI via scripting - by Kevin - 07-22-2012, 08:20 AM
RE: [2.2]Programmable AI via scripting - by Boop - 07-27-2012, 04:41 PM
RE: [2.2]Programmable AI via scripting - by A-Man - 09-15-2012, 05:23 PM
RE: [2.2]Programmable AI via scripting - by Boop - 05-05-2013, 04:44 PM
RE: [2.2]Programmable AI via scripting - by YinYin - 06-03-2013, 09:47 PM
RE: [2.2]Programmable AI via scripting - by zort - 06-12-2013, 05:45 PM
RE: [2.2]Programmable AI via scripting - by zort - 06-15-2013, 01:44 AM
RE: [2.2]Programmable AI via scripting - by zort - 06-14-2013, 07:21 PM
RE: [2.2]Programmable AI via scripting - by A-Man - 03-29-2016, 01:59 PM
RE: [2.2]Programmable AI via scripting - by Boop - 03-30-2016, 10:26 PM
RE: [2.2]Programmable AI via scripting - by Gad - 02-10-2017, 06:58 PM



Users browsing this thread: 5 Guest(s)