Posts: 1272
Registered: 2-4-06
Location: Adelaide South Australia
Member Is Offline
Mood: Very happy
posted on 29-5-09 at 17:19
Random pacing AI
first number is the AI SSN (734), second is items is what you want him to take a look at. great for, if you have several nuetral ais in a town moving
about at random.
if elapse(10) then
dornd
ssn2ssn(734, 732)
next
ssn2ssn(734, 733)
next
ssn2ssn(734, 653)
next
ssn2ssn(734, 735)
next
ssn2ssn(734, 733)
end
endif
Submitted by Jet
Baldo_the_Don
Administrator
Posts: 945
Registered: 12-5-08
Member Is Offline
Mood: Nervous, but cheerful.
posted on 29-5-09 at 18:30
This is how you'd do the same thing in DFBHD:
if past 10 and elapse 10 then
endif
if chain 1 then
if random 5 then
ssn2ssn 734 732 else
if eq rnd 2 then
ssn2ssn 734 733 else
if eq rnd 3 then
ssn2ssn 734 653 else
if eq rnd 4 then
ssn2ssn 734 735 else
if eq rnd 5 then
ssn2ssn 734 733 else
endif
endif
endif
endif
endif
endif
I should test this before I post it, but... I'll test it now and edit later if it fails.
Later - I added six new AIs to an existing test map, copied and pasted the stuff above into the .wac, and changed the SSNs. Then I watched and waited
'til the walking dude visited each of the other AIs. Test successful.