Team Spartan Cookies & Milk Forums
Faction Control for a AI - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Expression 2 (https://teamscm.co.uk/forum-6.html)
+--- Thread: Faction Control for a AI (/thread-157.html)



Faction Control for a AI - TheOneAndOnlyTee - 22-12-2013

this is an e2 example for chat controlled faction sharing botSay()

@name the new faction code
@inputs
@outputs
@persist
@trigger
Chat = lastSpoke():lastSaid():lower()
Ofaction = owner():getFaction()
Pfaction = lastSpoke():getFaction()
if(Pfaction == Ofaction){
ListenTo = lastSpoke()
}

if you use if(chatClk(owner())) or something replace owner with ListenTo


RE: Faction Control for a AI - busterbeej332 - 22-12-2013

nice work ill use this for atlantis

ill contiue work on atllantis tomoz


RE: Faction Control for a AI - Access - 26-12-2013

(22-12-2013, 03:26 PM)T-15 Wrote: this is an e2 example for chat controlled faction sharing botSay()

@name the new faction code
@inputs
@outputs
@persist
@trigger
Chat = lastSpoke():lastSaid():lower()
Ofaction = owner():getFaction()
Pfaction = lastSpoke():getFaction()
if(Pfaction == Ofaction){
ListenTo = lastSpoke()
}

if you use if(chatClk(owner())) or something replace owner with ListenTo
T-15 Good work but there is really no need for all of them lines of code there is 1 simple line of code that you can use for letting your faction members use your bot there is no need for the rest