Hello. I have a question.
It pertains to AI, and Projectile Detection.
I use Ultimate RPG AI (The Best by far) and I got it to detect projectiles, got the "ammo" to tick down etc.
However, it seems to only work sporadically. Yesterday it worked, then it didn't. Then I re-did it this morning, it worked. Then it suddenly stopped working.
So my question is, what's causing this? it seems if I get it working, then exit the game and go back, it stops detecting the projectiles.
So my question is, what's causing this? And how can I get it to continue working on a permenant basis?
The pertinant AI is thus.
___________________________________________________________
; 2) PROJECTILE DETECTION
; NOTE: To use this, first search in Genied2 for the number of the unit you want the projectiles detected from.
; Then, use the effect (in the scenario editor) AI SCRIPT GOAL value 1 to activate the projectile detection.
; Use AI SCRIPT GOAL value 2 to deactivate the detection. This is needed because the AI will add 1 ore for every shot
; your unit makes. This can mess up the game if it is active the whole time.
; Activate 'Detect projectile' AI
(defrule
(event-detected trigger 1)
=>
(set-goal 1 1)
(acknowledge-event trigger 1)
); Deactivate 'Detect projectile' AI
(defrule
(event-detected trigger 2)
=>
(set-goal 1 2)
(acknowledge-event trigger 2)
); Detect projectile
(defrule
(goal 1 1)
(cc-players-unit-type-count 1 363 greater-than 0)
=>
(cc-add-resource metal 1)
)
___________________________________________________________
[This message has been edited by Darth Persia (edited 08-18-2005 @ 02:26 PM).]