Last active: Never
Not logged in [Login - Register]
Portal Portal   Search the forums Search   Frequently Asked Questions FAQ   View member list Member List   Staff Staff List   View Topic Activity Topic Activity   Forum Stats Stats   Board Rules Board Rules   Downloads Downloads
Go To Bottom

Printable Version | Subscribe | Add to Favorites  
Author: Subject: Random pacing AI
Iceman
Owner/Admin
*********

Avatar

Avatar


Posts: 1272
Registered: 2-4-06
Location: Adelaide South Australia
Member Is Offline

Mood: Very happy

smug.gif 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






http://www.dfreload.com/eagle/sigs/16.gif

http://www.dfreload.com/sigs/doc_bar.gif

http://www.dfreload.com/sig/teamreload3.gif

View user's profile Visit user's homepage View All Posts By User U2U Member
Baldo_the_Don
Administrator
********

Avatar



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.




View user's profile Visit user's homepage View All Posts By User U2U Member

  Go To Top





Powered by XMB
Developed By The XMB Group © 2001-2008