Err, influence button

by Saran

Back to Mechanic's Corner.

Saran2006-03-02 13:39:47
Ok, for some reason i can't get this to work

CODE
#TRIGGER {* puffs up * chest and a crazy gleam enters} {#VAR empowering 0}
#BUTTON 25 {Empower} {
  #if (@empowering = 0) {
    icom
    #VAR empowerstep 1
    }
  #if (@empowering = 1) {
    iadm
    #VAR empowerstep 2
    }
  #if (@empowering = 2) {
    ipra
    #VAR empowerstep 0
    }
#VAR empowering @empowerstep


It's my way of simplifying influencing the guards down to a button click originally i had a toggle button but that doesn't work when i have three skills, this way every time i click the button it progresses.

But it doesn't seem to be changing from "ipra" and i really don't want to add triggers for each influence type (erg, need to deactivate the final trigger but i'm not sure how to probably just a if that's only set off the first time, the trigger setting the variable appropriately and deactivating itself)
Saran2006-03-02 13:53:33
oh nevermind, i just needed to remove the trigger...
hrm *ponders setting the @empowering variable to change with triggers for efficiency*
Daganev2006-03-02 19:33:34
I was going to say, in the trigger you need a empower= @empower + 1 And an #If @empower > 2 {@empower = 0}
Saran2006-03-02 20:05:48
heh, The way i did it similar to this fibonacci sequence program i had to write, though your way may be shorter...

bah that'll teach me to look at my old tafe stuff.