myAi

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
Post Reply
User avatar
the1unknown
Yogi
Posts: 344
Joined: Sat Jul 21, 2018 3:27 am

Re: myAi

Post by the1unknown »

thank you all, I will try to use (attack-now) cautiously
"you don't have to be great to start, but you have to start to be great" -the villager

User avatar
the1unknown
Yogi
Posts: 344
Joined: Sat Jul 21, 2018 3:27 am

Re: myAi

Post by the1unknown »

After 6 months of ai scripting I finally understand (defconst and (goals

during this time I tried so hard to learn and understand them, but I failed. I quitted ai scripting few times because of this

here's my first goal

Code: Select all

(defconst SLING 137)

(defrule (true)
=> (set-goal SLING 0)(disable-self))
(defrule (goal SLING 1) (wood-amount >= 60) 
=>  (tribute-to-player any-ally wood 10) )
(defrule (goal SLING 1)  (food-amount >= 70) 
=>  (tribute-to-player any-ally food 10) )

(defrule (taunt-detected any-ally 38) (building-type-count market >= 1)
=> (chat-to-allies "Okey, i will sling you !") (chat-local-to-self "Sling script loaded")  (set-goal SLING 1)(acknowledge-taunt this-any-ally 38)  )
anyway .. not big deal, but I felt I had to share this :D
"you don't have to be great to start, but you have to start to be great" -the villager

scripter64
Waheguru
Posts: 5891
Joined: Fri Jan 16, 2009 8:36 pm

Re: myAi

Post by scripter64 »

Yes, it's a bit awkward at first (the ES term "goal" probably makes it more confusing lol), nice work :)

User avatar
Electricity
Swami
Posts: 114
Joined: Sun Oct 14, 2018 8:59 am

Re: myAi

Post by Electricity »

:D Good job!

User avatar
LightTree
Waheguru
Posts: 1608
Joined: Wed Mar 10, 2010 12:21 am

Re: myAi

Post by LightTree »

scripter64 wrote:Would that person like 8+ layer walls and mini-towns across the map? :')
1


:lol: :( :(.

Post Reply